diff options
author | Joey Hess <joey@kitenet.net> | 2013-11-12 21:05:04 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2013-11-12 21:05:04 -0400 |
commit | 77829e3233e74a97d9b7f933b6ba8d067c0fce5a (patch) | |
tree | e323fe3e251093d234f84a79372a4d314244cd4a /Command/Fix.hs | |
parent | f8887515d07aa4712083e47eb3e49d98eb41331e (diff) |
avoid using Utility.Touch without WITH_CLIBS
Diffstat (limited to 'Command/Fix.hs')
-rw-r--r-- | Command/Fix.hs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Command/Fix.hs b/Command/Fix.hs index da2627619..a63a10f8f 100644 --- a/Command/Fix.hs +++ b/Command/Fix.hs @@ -14,9 +14,11 @@ import System.PosixCompat.Files import Common.Annex import Command import qualified Annex.Queue +#ifdef WITH_CLIBS #ifndef __ANDROID__ import Utility.Touch #endif +#endif def :: [Command] def = [notDirect $ noCommit $ command "fix" paramPaths seek @@ -36,17 +38,21 @@ start file (key, _) = do perform :: FilePath -> FilePath -> CommandPerform perform file link = do liftIO $ do +#ifdef WITH_CLIBS #ifndef __ANDROID__ -- preserve mtime of symlink mtime <- catchMaybeIO $ TimeSpec . modificationTime <$> getSymbolicLinkStatus file #endif +#endif createDirectoryIfMissing True (parentDir file) removeFile file createSymbolicLink link file +#ifdef WITH_CLIBS #ifndef __ANDROID__ maybe noop (\t -> touch file t False) mtime #endif +#endif next $ cleanup file cleanup :: FilePath -> CommandCleanup |