diff options
author | Joey Hess <joey@kitenet.net> | 2011-11-28 22:43:51 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2011-11-28 22:43:51 -0400 |
commit | da9cd315beb03570b96f83063a39e799fe01b166 (patch) | |
tree | 61fdc79dd54dccf1792cf3ccadcc584e0119d077 /Remote/Bup.hs | |
parent | 2b3c120506f1f25b4c3d0e19342b9826bde0b3b5 (diff) |
add support for using hashDirLower in addition to hashDirMixed
Supporting multiple directory hash types will allow converting to a
different one, without a flag day.
gitAnnexLocation now checks which of the possible locations have a file.
This means more statting of files. Several places currently use
gitAnnexLocation and immediately check if the returned file exists;
those need to be optimised.
Diffstat (limited to 'Remote/Bup.hs')
-rw-r--r-- | Remote/Bup.hs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Remote/Bup.hs b/Remote/Bup.hs index 4c826498d..589dea91d 100644 --- a/Remote/Bup.hs +++ b/Remote/Bup.hs @@ -102,13 +102,13 @@ bupSplitParams r buprepo k src = do store :: Git.Repo -> BupRepo -> Key -> Annex Bool store r buprepo k = do - src <- fromRepo $ gitAnnexLocation k + src <- inRepo $ gitAnnexLocation k params <- bupSplitParams r buprepo k (File src) liftIO $ boolSystem "bup" params storeEncrypted :: Git.Repo -> BupRepo -> (Cipher, Key) -> Key -> Annex Bool storeEncrypted r buprepo (cipher, enck) k = do - src <- fromRepo $ gitAnnexLocation k + src <- inRepo $ gitAnnexLocation k params <- bupSplitParams r buprepo enck (Param "-") liftIO $ catchBoolIO $ withEncryptedHandle cipher (L.readFile src) $ \h -> |