summaryrefslogtreecommitdiff
path: root/Remote/Rsync.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Remote/Rsync.hs')
-rw-r--r--Remote/Rsync.hs33
1 files changed, 18 insertions, 15 deletions
diff --git a/Remote/Rsync.hs b/Remote/Rsync.hs
index ee516a8a5..1ed73e119 100644
--- a/Remote/Rsync.hs
+++ b/Remote/Rsync.hs
@@ -45,21 +45,24 @@ gen r u c = do
return $ encryptableRemote c
(storeEncrypted o)
(retrieveEncrypted o)
- Remote {
- uuid = u,
- cost = cst,
- name = Git.repoDescribe r,
- storeKey = store o,
- retrieveKeyFile = retrieve o,
- retrieveKeyFileCheap = retrieveCheap o,
- removeKey = remove o,
- hasKey = checkPresent r o,
- hasKeyCheap = False,
- whereisKey = Nothing,
- config = Nothing,
- repo = r,
- remotetype = remote
- }
+ Remote
+ { uuid = u
+ , cost = cst
+ , name = Git.repoDescribe r
+ , storeKey = store o
+ , retrieveKeyFile = retrieve o
+ , retrieveKeyFileCheap = retrieveCheap o
+ , removeKey = remove o
+ , hasKey = checkPresent r o
+ , hasKeyCheap = False
+ , whereisKey = Nothing
+ , config = Nothing
+ , repo = r
+ , path = if rsyncUrlIsPath $ rsyncUrl o
+ then Just $ rsyncUrl o
+ else Nothing
+ , remotetype = remote
+ }
genRsyncOpts :: Git.Repo -> Maybe RemoteConfig -> Annex RsyncOpts
genRsyncOpts r c = do