finish fixing removeLink on windows

9cb250f7be got the ones in RawFilePath,
but there were others that used the one from unix-compat, which fails at
runtime on windows. To avoid this,
import System.PosixCompat.Files hiding removeLink

This commit was sponsored by Ethan Aubin.
This commit is contained in:
Joey Hess 2020-11-24 12:38:12 -04:00
parent dce0781391
commit a3b714ddd9
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
28 changed files with 73 additions and 64 deletions

View file

@ -49,8 +49,8 @@ import Annex.InodeSentinal
import Upgrade
import Annex.Tmp
import Utility.UserInfo
#ifndef mingw32_HOST_OS
import qualified Utility.RawFilePath as R
#ifndef mingw32_HOST_OS
import Utility.ThreadScheduler
import Annex.Perms
import Utility.FileMode
@ -212,9 +212,9 @@ probeCrippledFileSystem' tmp = do
where
probe f = catchDefaultIO (True, []) $ do
let f2 = f ++ "2"
removeWhenExistsWith removeLink f2
removeWhenExistsWith R.removeLink (toRawFilePath f2)
createSymbolicLink f f2
removeWhenExistsWith removeLink f2
removeWhenExistsWith R.removeLink (toRawFilePath f2)
preventWrite (toRawFilePath f)
-- Should be unable to write to the file, unless
-- running as root, but some crippled