make unused check branches and tags too

needs time and space optimisation
This commit is contained in:
Joey Hess 2011-09-28 16:43:10 -04:00
parent 5ae270001c
commit 297bc648b9
4 changed files with 41 additions and 7 deletions

View file

@ -17,6 +17,7 @@ module Backend (
) where
import Control.Monad.State (liftIO, when)
import Control.Applicative
import System.IO.Error (try)
import System.FilePath
import System.Posix.Files
@ -86,9 +87,7 @@ lookupFile file = do
Left _ -> return Nothing
Right l -> makekey l
where
getsymlink = do
l <- readSymbolicLink file
return $ takeFileName l
getsymlink = takeFileName <$> readSymbolicLink file
makekey l = maybe (return Nothing) (makeret l) (fileKey l)
makeret l k =
case maybeLookupBackendName bname of