summaryrefslogtreecommitdiff
path: root/Remote/Bup.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2013-01-06 14:29:01 -0400
committerGravatar Joey Hess <joey@kitenet.net>2013-01-06 14:29:01 -0400
commita6cd089cea9b2e6d12461f02ca7fbef9b12d403c (patch)
tree5a6ed63807b8b012f42f8f8f2ab6da5e5883d342 /Remote/Bup.hs
parent3bac971ac22afd706d7ad52013c86a7dae80c684 (diff)
Fix transferring files to special remotes in direct mode.
Diffstat (limited to 'Remote/Bup.hs')
-rw-r--r--Remote/Bup.hs7
1 files changed, 3 insertions, 4 deletions
diff --git a/Remote/Bup.hs b/Remote/Bup.hs
index 2f71e516d..56253f5b8 100644
--- a/Remote/Bup.hs
+++ b/Remote/Bup.hs
@@ -27,6 +27,7 @@ import Crypto
import Data.ByteString.Lazy.UTF8 (fromString)
import Data.Digest.Pure.SHA
import Utility.UserInfo
+import Annex.Content
type BupRepo = String
@@ -120,14 +121,12 @@ bupSplitParams r buprepo k src = do
(os ++ [Param "-n", Param (bupRef k)] ++ src)
store :: Remote -> BupRepo -> Key -> AssociatedFile -> MeterUpdate -> Annex Bool
-store r buprepo k _f _p = do
- src <- inRepo $ gitAnnexLocation k
+store r buprepo k _f _p = sendAnnex k $ \src -> do
params <- bupSplitParams r buprepo k [File src]
liftIO $ boolSystem "bup" params
storeEncrypted :: Remote -> BupRepo -> (Cipher, Key) -> Key -> MeterUpdate -> Annex Bool
-storeEncrypted r buprepo (cipher, enck) k _p = do
- src <- inRepo $ gitAnnexLocation k
+storeEncrypted r buprepo (cipher, enck) k _p = sendAnnex k $ \src -> do
params <- bupSplitParams r buprepo enck []
liftIO $ catchBoolIO $
encrypt cipher (feedFile src) $ \h ->