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

@ -594,14 +594,10 @@ linkOrCopy' canhardlink key src dest = catchBoolIO $
where
hardlink = do
s <- getstat
#ifndef mingw32_HOST_OS
if linkCount s > 1
then copy s
else liftIO (createLink src dest >> return True)
`catchIO` const (copy s)
#else
copy s
#endif
copy = checkedCopyFile' key src dest
getstat = liftIO $ getFileStatus src