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:
parent
251405eca2
commit
cf06dac2b8
8 changed files with 29 additions and 26 deletions
|
@ -5,8 +5,6 @@
|
|||
- Licensed under the GNU GPL version 3 or higher.
|
||||
-}
|
||||
|
||||
{-# LANGUAGE CPP #-}
|
||||
|
||||
module Command.Unannex where
|
||||
|
||||
import Command
|
||||
|
@ -107,15 +105,11 @@ cleanupIndirect file key = do
|
|||
copyfrom src =
|
||||
thawContent file `after` liftIO (copyFileExternal CopyAllMetaData src file)
|
||||
hardlinkfrom src =
|
||||
#ifndef mingw32_HOST_OS
|
||||
-- creating a hard link could fall; fall back to copying
|
||||
ifM (liftIO $ catchBoolIO $ createLink src file >> return True)
|
||||
( return True
|
||||
, copyfrom src
|
||||
)
|
||||
#else
|
||||
copyfrom src
|
||||
#endif
|
||||
|
||||
performDirect :: FilePath -> Key -> CommandPerform
|
||||
performDirect file key = do
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue