fix removeLink on windows

This removeLink was introduced in commit
e505c03bcc, which replaced code
that used removeFile on Windows. So, I know git-annex did not used to do
anything other than removeFile on Windows. If there were symlinks it
wanted to remove, this would not work on windows, but of course it does
not use symlinks on windows.
This commit is contained in:
Joey Hess 2020-11-19 12:20:18 -04:00
parent c3be0c8dd2
commit 9cb250f7be
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38

View file

@ -66,8 +66,10 @@ createLink a b = P.createLink
(fromRawFilePath a) (fromRawFilePath a)
(fromRawFilePath b) (fromRawFilePath b)
{- On windows, removeLink is not available, so only remove files,
- not symbolic links. -}
removeLink :: RawFilePath -> IO () removeLink :: RawFilePath -> IO ()
removeLink = P.removeLink . fromRawFilePath removeLink = D.removeFile . fromRawFilePath
getFileStatus :: RawFilePath -> IO FileStatus getFileStatus :: RawFilePath -> IO FileStatus
getFileStatus = P.getFileStatus . fromRawFilePath getFileStatus = P.getFileStatus . fromRawFilePath