hard links on windows

* annex.thin and annex.hardlink are now supported on Windows.
* unannex --fast now makes hard links on Windows.
This commit is contained in:
Joey Hess 2016-04-08 15:25:32 -04:00
parent 251405eca2
commit cf06dac2b8
Failed to extract signature
8 changed files with 29 additions and 26 deletions

View file

@ -49,13 +49,9 @@ copyFileExternal meta src dest = do
{- Create a hard link if the filesystem allows it, and fall back to copying
- the file. -}
createLinkOrCopy :: FilePath -> FilePath -> IO Bool
#ifndef mingw32_HOST_OS
createLinkOrCopy src dest = go `catchIO` const fallback
where
go = do
createLink src dest
return True
fallback = copyFileExternal CopyAllMetaData src dest
#else
createLinkOrCopy = copyFileExternal CopyAllMetaData
#endif