aboutsummaryrefslogtreecommitdiff
path: root/Remote/Rsync/RsyncUrl.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Remote/Rsync/RsyncUrl.hs')
-rw-r--r--Remote/Rsync/RsyncUrl.hs5
1 files changed, 4 insertions, 1 deletions
diff --git a/Remote/Rsync/RsyncUrl.hs b/Remote/Rsync/RsyncUrl.hs
index c0f30c1fb..67ce7946b 100644
--- a/Remote/Rsync/RsyncUrl.hs
+++ b/Remote/Rsync/RsyncUrl.hs
@@ -1,6 +1,6 @@
{- Rsync urls.
-
- - Copyright 2014 Joey Hess <id@joeyh.name>
+ - Copyright 2014-2018 Joey Hess <id@joeyh.name>
-
- Licensed under the GNU GPL version 3 or higher.
-}
@@ -36,6 +36,9 @@ rsyncEscape o u
| rsyncShellEscape o && rsyncUrlIsShell (rsyncUrl o) = shellEscape u
| otherwise = u
+mkRsyncUrl :: RsyncOpts -> FilePath -> RsyncUrl
+mkRsyncUrl o f = rsyncUrl o </> rsyncEscape o f
+
rsyncUrls :: RsyncOpts -> Key -> [RsyncUrl]
rsyncUrls o k = map use dirHashes
where