aboutsummaryrefslogtreecommitdiff
path: root/Remote/Rsync.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2014-03-18 12:55:08 -0400
committerGravatar Joey Hess <joey@kitenet.net>2014-03-18 13:02:10 -0400
commit1e3542644906536aae36088131923b93dab67d44 (patch)
treea7af40ec84b889d31f1379725e87a595655c3adc /Remote/Rsync.hs
parentc134f6e46417fd2f4c159234fd717d56f7c2cdaa (diff)
rsync special remote: Fix slashes when used on Windows.
Diffstat (limited to 'Remote/Rsync.hs')
-rw-r--r--Remote/Rsync.hs22
1 files changed, 1 insertions, 21 deletions
diff --git a/Remote/Rsync.hs b/Remote/Rsync.hs
index 8f00a767e..7d051d6cd 100644
--- a/Remote/Rsync.hs
+++ b/Remote/Rsync.hs
@@ -28,6 +28,7 @@ import Annex.UUID
import Annex.Ssh
import Remote.Helper.Special
import Remote.Helper.Encryptable
+import Remote.Rsync.RsyncUrl
import Crypto
import Utility.Rsync
import Utility.CopyFile
@@ -40,16 +41,6 @@ import Types.Creds
import qualified Data.ByteString.Lazy as L
import qualified Data.Map as M
-type RsyncUrl = String
-
-data RsyncOpts = RsyncOpts
- { rsyncUrl :: RsyncUrl
- , rsyncOptions :: [CommandParam]
- , rsyncUploadOptions :: [CommandParam]
- , rsyncDownloadOptions :: [CommandParam]
- , rsyncShellEscape :: Bool
-}
-
remote :: RemoteType
remote = RemoteType {
typename = "rsync",
@@ -148,17 +139,6 @@ rsyncSetup mu _ c = do
gitConfigSpecialRemote u c' "rsyncurl" url
return (c', u)
-rsyncEscape :: RsyncOpts -> String -> String
-rsyncEscape o s
- | rsyncShellEscape o && rsyncUrlIsShell (rsyncUrl o) = shellEscape s
- | otherwise = s
-
-rsyncUrls :: RsyncOpts -> Key -> [String]
-rsyncUrls o k = map use annexHashes
- where
- use h = rsyncUrl o </> h k </> rsyncEscape o (f </> f)
- f = keyFile k
-
store :: RsyncOpts -> Key -> AssociatedFile -> MeterUpdate -> Annex Bool
store o k _f p = sendAnnex k (void $ remove o k) $ rsyncSend o p k False