summaryrefslogtreecommitdiff
path: root/Command/Add.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Command/Add.hs')
-rw-r--r--Command/Add.hs4
1 files changed, 4 insertions, 0 deletions
diff --git a/Command/Add.hs b/Command/Add.hs
index e0a8269aa..88515d79f 100644
--- a/Command/Add.hs
+++ b/Command/Add.hs
@@ -24,8 +24,10 @@ import Annex.Link
import qualified Annex
import qualified Annex.Queue
#ifndef __ANDROID__
+#ifdef WTTH_CLIBS
import Utility.Touch
#endif
+#endif
import Utility.FileMode
import Config
import Utility.InodeCache
@@ -206,12 +208,14 @@ link file key mcache = flip catchAnnex (undo file key) $ do
replaceFile file $ makeAnnexLink l
#ifndef __ANDROID__
+#ifdef WITH_CLIBS
-- touch symlink to have same time as the original file,
-- as provided in the InodeCache
case mcache of
Just c -> liftIO $ touch file (TimeSpec $ inodeCacheToMtime c) False
Nothing -> noop
#endif
+#endif
return l