summaryrefslogtreecommitdiff
path: root/Backend.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2010-10-12 16:40:17 -0400
committerGravatar Joey Hess <joey@kitenet.net>2010-10-12 16:40:17 -0400
commit921313bcc706f054c33c3eb923c47955710cd0a3 (patch)
tree4918e019f21a1c5a3e01284ff0076e3b0614b5b8 /Backend.hs
parent570899ed0c16121705ad5db1cb7aa96181a306a5 (diff)
consistency
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 fab82a093..f03f098cf 100644
--- a/Backend.hs
+++ b/Backend.hs
@@ -56,7 +56,7 @@ retrieveFile state file dest = do
case (result) of
Nothing -> return False
Just b -> do
- key <- lookupKey b state file
+ key <- lookupKey state b file
(retrieveKeyFile b) state key dest
{- Drops the key for a file from the backend that has it. -}
@@ -66,7 +66,7 @@ dropFile state file = do
case (result) of
Nothing -> return Nothing
Just b -> do
- key <- lookupKey b state file
+ key <- lookupKey state b file
(removeKey b) state key
removeFile $ backendFile state b file
return $ Just key
@@ -95,8 +95,8 @@ checkBackend :: Backend -> State -> FilePath -> IO (Bool)
checkBackend backend state file = doesFileExist $ backendFile state backend file
{- Looks up the key a backend uses for an already annexed file. -}
-lookupKey :: Backend -> State -> FilePath -> IO Key
-lookupKey backend state file = do
+lookupKey :: State -> Backend -> FilePath -> IO Key
+lookupKey state backend file = do
k <- readFile (backendFile state backend file)
return $ chomp k
where