diff options
author | Joey Hess <joey@kitenet.net> | 2011-04-02 15:50:51 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2011-04-02 15:50:51 -0400 |
commit | f005a84e5675cb3e551b2922ad42642df28264d6 (patch) | |
tree | 676305c323a4eb61e01b2c4212b9e63b5fc9d8b0 /Content.hs | |
parent | 00b9a9a25d6032a29c053f970e861a8ee5fd3bf8 (diff) |
add loggedKeys
Diffstat (limited to 'Content.hs')
-rw-r--r-- | Content.hs | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/Content.hs b/Content.hs index 88e8dbc00..ba265c930 100644 --- a/Content.hs +++ b/Content.hs @@ -219,9 +219,9 @@ getKeysPresent' dir = do then return [] else do -- 2 levels of hashing - levela <- liftIO $ subdirContent dir - levelb <- liftIO $ mapM subdirContent levela - contents <- liftIO $ mapM subdirContent (concat levelb) + levela <- liftIO $ dirContents dir + levelb <- liftIO $ mapM dirContents levela + contents <- liftIO $ mapM dirContents (concat levelb) files <- liftIO $ filterM present (concat contents) return $ catMaybes $ map (fileKey . takeFileName) files where @@ -231,7 +231,3 @@ getKeysPresent' dir = do case result of Right s -> return $ isRegularFile s Left _ -> return False - subdirContent d = do - c <- getDirectoryContents d - return $ map (d </>) $ filter notcruft c - notcruft f = f /= "." && f /= ".." |