summaryrefslogtreecommitdiff
path: root/Git/Construct.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <id@joeyh.name>2013-05-11 15:03:00 -0500
committerGravatar Joey Hess <id@joeyh.name>2013-05-11 15:03:00 -0500
commitd0fa82fb721cdc85438287e29a94cb796b7bc464 (patch)
tree26a2486b8e715b5937ce41679eafd42c02f2310a /Git/Construct.hs
parent679eaf6077375c5d59501d12c79e0891cbdd904f (diff)
git-annex now builds on Windows (doesn't work)
Diffstat (limited to 'Git/Construct.hs')
-rwxr-xr-xGit/Construct.hs6
1 files changed, 5 insertions, 1 deletions
diff --git a/Git/Construct.hs b/Git/Construct.hs
index f7aca6130..1ed91a017 100755
--- a/Git/Construct.hs
+++ b/Git/Construct.hs
@@ -23,7 +23,7 @@ module Git.Construct (
checkForRepo,
) where
-#ifndef mingw32_HOST_OS
+#ifndef __WINDOWS__
import System.Posix.User
#endif
import qualified Data.Map as M hiding (map, split)
@@ -196,6 +196,9 @@ repoAbsPath d = do
return $ h </> d'
expandTilde :: FilePath -> IO FilePath
+#ifdef __WINDOWS__
+expandTilde = return
+#else
expandTilde = expandt True
where
expandt _ [] = return ""
@@ -216,6 +219,7 @@ expandTilde = expandt True
findname n (c:cs)
| c == '/' = (n, cs)
| otherwise = findname (n++[c]) cs
+#endif
{- Checks if a git repository exists in a directory. Does not find
- git repositories in parent directories. -}