summaryrefslogtreecommitdiff
path: root/Backend.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2010-10-10 15:41:35 -0400
committerGravatar Joey Hess <joey@kitenet.net>2010-10-10 15:41:35 -0400
commit7880dc16fef81bb6a8812c6b4e9578a6ae2b2879 (patch)
tree7661b3879b848b3b6bdd5924740b74923c991936 /Backend.hs
parenteb577ee37ff1d631aa3580a235b9954043d0fb27 (diff)
update
Diffstat (limited to 'Backend.hs')
-rw-r--r--Backend.hs8
1 files changed, 4 insertions, 4 deletions
diff --git a/Backend.hs b/Backend.hs
index d6b433989..40279866f 100644
--- a/Backend.hs
+++ b/Backend.hs
@@ -28,9 +28,9 @@ data Backend = Backend {
-- name of this backend
name :: String,
-- converts a filename to a key
- getKey :: FilePath -> IO (Maybe Key),
+ getKey :: GitRepo -> FilePath -> IO (Maybe Key),
-- stores a file's contents to a key
- storeFileKey :: FilePath -> Key -> IO (Bool),
+ storeFileKey :: GitRepo -> FilePath -> Key -> IO (Bool),
-- retrieves a key's contents to a file
retrieveKeyFile :: IO Key -> FilePath -> IO (Bool)
}
@@ -49,11 +49,11 @@ backendFile backend repo file = gitStateDir repo ++
storeFile :: [Backend] -> GitRepo -> FilePath -> IO (Maybe Key)
storeFile [] _ _ = return Nothing
storeFile (b:bs) repo file = do
- try <- (getKey b) (gitRelative repo file)
+ try <- (getKey b) repo (gitRelative repo file)
case (try) of
Nothing -> nextbackend
Just key -> do
- stored <- (storeFileKey b) file key
+ stored <- (storeFileKey b) repo file key
if (not stored)
then nextbackend
else do