summaryrefslogtreecommitdiff
path: root/Annex
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2012-09-17 00:18:07 -0400
committerGravatar Joey Hess <joey@kitenet.net>2012-09-17 00:18:07 -0400
commite8188ea611e4c9223492203c0ec0370c3c45b225 (patch)
tree2a078993be28d1dedc38f8ab9ad193eea0ecf90e /Annex
parentba744c84a4f683e50bf4c9b8c388e3a611f7fb91 (diff)
flip catchDefaultIO
Diffstat (limited to 'Annex')
-rw-r--r--Annex/Branch.hs2
-rw-r--r--Annex/Content.hs2
-rw-r--r--Annex/Journal.hs4
-rw-r--r--Annex/Ssh.hs2
4 files changed, 5 insertions, 5 deletions
diff --git a/Annex/Branch.hs b/Annex/Branch.hs
index 1272bd95f..e74ab3a29 100644
--- a/Annex/Branch.hs
+++ b/Annex/Branch.hs
@@ -322,7 +322,7 @@ needUpdateIndex :: Git.Ref -> Annex Bool
needUpdateIndex branchref = do
lock <- fromRepo gitAnnexIndexLock
lockref <- Git.Ref . firstLine <$>
- liftIO (catchDefaultIO (readFileStrict lock) "")
+ liftIO (catchDefaultIO "" $ readFileStrict lock)
return (lockref /= branchref)
{- Record that the branch's index has been updated to correspond to a
diff --git a/Annex/Content.hs b/Annex/Content.hs
index fab27d88a..e6afd5465 100644
--- a/Annex/Content.hs
+++ b/Annex/Content.hs
@@ -280,7 +280,7 @@ getKeysPresent :: Annex [Key]
getKeysPresent = liftIO . traverse (2 :: Int) =<< fromRepo gitAnnexObjectDir
where
traverse depth dir = do
- contents <- catchDefaultIO (dirContents dir) []
+ contents <- catchDefaultIO [] (dirContents dir)
if depth == 0
then continue (mapMaybe (fileKey . takeFileName) contents) []
else do
diff --git a/Annex/Journal.hs b/Annex/Journal.hs
index ff103180e..4a56ce3e3 100644
--- a/Annex/Journal.hs
+++ b/Annex/Journal.hs
@@ -47,8 +47,8 @@ getJournalledFiles = map fileJournal <$> getJournalFiles
getJournalFiles :: Annex [FilePath]
getJournalFiles = do
g <- gitRepo
- fs <- liftIO $
- catchDefaultIO (getDirectoryContents $ gitAnnexJournalDir g) []
+ fs <- liftIO $ catchDefaultIO [] $
+ getDirectoryContents $ gitAnnexJournalDir g
return $ filter (`notElem` [".", ".."]) fs
{- Checks if there are changes in the journal. -}
diff --git a/Annex/Ssh.hs b/Annex/Ssh.hs
index 46885393c..a0aae2b7e 100644
--- a/Annex/Ssh.hs
+++ b/Annex/Ssh.hs
@@ -71,7 +71,7 @@ sshCleanup :: Annex ()
sshCleanup = do
dir <- fromRepo gitAnnexSshDir
sockets <- filter (not . isLock) <$>
- liftIO (catchDefaultIO (dirContents dir) [])
+ liftIO (catchDefaultIO [] $ dirContents dir)
forM_ sockets cleanup
where
cleanup socketfile = do