aboutsummaryrefslogtreecommitdiff
path: root/Command/Fix.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2013-10-17 16:35:14 -0400
committerGravatar Joey Hess <joey@kitenet.net>2013-10-17 16:35:14 -0400
commit699a90bdc195a67c5aa5fca34fcaa07fb2b530ae (patch)
treee99efef516c2acbb7878bda4e478ec66e9a065cb /Command/Fix.hs
parent75bfb04d5d63fe7ad91213606b1bb22ee5e7b4ff (diff)
avoid hsc files on Windows
This used to work, but now hsc2hs is failing with a usage message. Since I have not changed my windows build environment at all, it must be some change due to a change in the cabal file. Perhaps too make flags are causing it to hit a windows command line length limit? Anyway, these hsc files did nothing on Windows, so can be omitted and not built to work around yet another epic windows weirdness.
Diffstat (limited to 'Command/Fix.hs')
-rw-r--r--Command/Fix.hs6
1 files changed, 6 insertions, 0 deletions
diff --git a/Command/Fix.hs b/Command/Fix.hs
index da2627619..a1e30eafa 100644
--- a/Command/Fix.hs
+++ b/Command/Fix.hs
@@ -15,8 +15,10 @@ import Common.Annex
import Command
import qualified Annex.Queue
#ifndef __ANDROID__
+#ifdef WITH_CLIBS
import Utility.Touch
#endif
+#endif
def :: [Command]
def = [notDirect $ noCommit $ command "fix" paramPaths seek
@@ -37,16 +39,20 @@ perform :: FilePath -> FilePath -> CommandPerform
perform file link = do
liftIO $ do
#ifndef __ANDROID__
+#ifdef WITH_CLIBS
-- preserve mtime of symlink
mtime <- catchMaybeIO $ TimeSpec . modificationTime
<$> getSymbolicLinkStatus file
#endif
+#endif
createDirectoryIfMissing True (parentDir file)
removeFile file
createSymbolicLink link file
#ifndef __ANDROID__
+#ifdef WITH_CLIBS
maybe noop (\t -> touch file t False) mtime
#endif
+#endif
next $ cleanup file
cleanup :: FilePath -> CommandCleanup