summaryrefslogtreecommitdiff
path: root/Remote
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2011-04-16 16:29:28 -0400
committerGravatar Joey Hess <joey@kitenet.net>2011-04-16 16:29:28 -0400
commit5efd41327045f8da55c972b7391309c99dee5afc (patch)
tree4fb7a681de188d6b598698ea505d63ae36958a3b /Remote
parent669851454cd3032d2097842f7b6027b3464da032 (diff)
add encryption support to directory special remotes
Diffstat (limited to 'Remote')
-rw-r--r--Remote/Directory.hs6
1 files changed, 4 insertions, 2 deletions
diff --git a/Remote/Directory.hs b/Remote/Directory.hs
index 2313f79a0..bb1ef60e4 100644
--- a/Remote/Directory.hs
+++ b/Remote/Directory.hs
@@ -26,6 +26,7 @@ import Config
import Content
import Utility
import Remote.Special
+import Remote.Encrypted
remote :: RemoteType Annex
remote = RemoteType {
@@ -59,11 +60,12 @@ directorySetup u c = do
Just d -> d
e <- liftIO $ doesDirectoryExist dir
when (not e) $ error $ "Directory does not exist: " ++ dir
+ c' <- encryptionSetup c
-- The directory is stored in git config, not in this remote's
-- persistant state, so it can vary between hosts.
- gitConfigSpecialRemote u c "directory" dir
- return $ M.delete "directory" c
+ gitConfigSpecialRemote u c' "directory" dir
+ return $ M.delete "directory" c'
dirKey :: FilePath -> Key -> FilePath
dirKey d k = d </> hashDirMixed k </> f </> f