summaryrefslogtreecommitdiff
path: root/Remote
diff options
context:
space:
mode:
Diffstat (limited to 'Remote')
-rw-r--r--Remote/Git.hs10
-rw-r--r--Remote/Helper/Hooks.hs2
2 files changed, 9 insertions, 3 deletions
diff --git a/Remote/Git.hs b/Remote/Git.hs
index c9cebfb14..e269b9ad8 100644
--- a/Remote/Git.hs
+++ b/Remote/Git.hs
@@ -17,7 +17,6 @@ import qualified Data.Map as M
import Control.Exception.Extensible
import Common.Annex
-import Utility.CopyFile
import Utility.Rsync
import Remote.Helper.Ssh
import Annex.Ssh
@@ -44,6 +43,9 @@ import Types.Key
import qualified Fields
import Logs.Location
import Utility.Metered
+#ifndef mingw32_HOST_OS
+import Utility.CopyFile
+#endif
import Control.Concurrent
import Control.Concurrent.MSampleVar
@@ -360,8 +362,8 @@ copyFromRemote' r key file dest
bracketIO noop (const $ tryIO $ killThread tid) (const $ a feeder)
copyFromRemoteCheap :: Remote -> Key -> FilePath -> Annex Bool
-copyFromRemoteCheap r key file
#ifndef mingw32_HOST_OS
+copyFromRemoteCheap r key file
| not $ Git.repoIsUrl (repo r) = guardUsable (repo r) False $ do
loc <- liftIO $ gitAnnexLocation key (repo r) $
fromJust $ remoteGitConfig $ gitconfig r
@@ -371,8 +373,10 @@ copyFromRemoteCheap r key file
( copyFromRemote' r key Nothing file
, return False
)
-#endif
| otherwise = return False
+#else
+copyFromRemoteCheap _ _ _ = return False
+#endif
{- Tries to copy a key's content to a remote's annex. -}
copyToRemote :: Remote -> Key -> AssociatedFile -> MeterUpdate -> Annex Bool
diff --git a/Remote/Helper/Hooks.hs b/Remote/Helper/Hooks.hs
index dfc543d0a..96081b024 100644
--- a/Remote/Helper/Hooks.hs
+++ b/Remote/Helper/Hooks.hs
@@ -15,7 +15,9 @@ import Common.Annex
import Types.Remote
import qualified Annex
import Annex.LockPool
+#ifndef mingw32_HOST_OS
import Annex.Perms
+#endif
{- Modifies a remote's access functions to first run the
- annex-start-command hook, and trigger annex-stop-command on shutdown.