summaryrefslogtreecommitdiff
path: root/Remote/Rsync.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2013-03-15 19:16:13 -0400
committerGravatar Joey Hess <joey@kitenet.net>2013-03-15 19:16:13 -0400
commiteabe9d8c6177318432eb81120f4d5db05898c891 (patch)
tree6fedada070d79a4afec236a63ead893bc41b04e9 /Remote/Rsync.hs
parent34c604b935e6e3e40796c9132ed19d44442cb809 (diff)
add globallyAvailable to remotes
Diffstat (limited to 'Remote/Rsync.hs')
-rw-r--r--Remote/Rsync.hs4
1 files changed, 3 insertions, 1 deletions
diff --git a/Remote/Rsync.hs b/Remote/Rsync.hs
index c303316ab..1425601ad 100644
--- a/Remote/Rsync.hs
+++ b/Remote/Rsync.hs
@@ -60,14 +60,16 @@ gen r u c gc = do
, config = M.empty
, repo = r
, gitconfig = gc
- , localpath = if rsyncUrlIsPath $ rsyncUrl o
+ , localpath = if islocal
then Just $ rsyncUrl o
else Nothing
, readonly = False
+ , globallyAvailable = not $ islocal
, remotetype = remote
}
where
o = RsyncOpts url opts escape
+ islocal = rsyncUrlIsPath $ rsyncUrl o
url = fromMaybe (error "missing rsyncurl") $ remoteAnnexRsyncUrl gc
opts = map Param $ filter safe $ remoteAnnexRsyncOptions gc
escape = M.lookup "shellescape" c /= Just "no"