summaryrefslogtreecommitdiff
path: root/Backend.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Backend.hs')
-rw-r--r--Backend.hs5
1 files changed, 2 insertions, 3 deletions
diff --git a/Backend.hs b/Backend.hs
index d12913985..ca822de5c 100644
--- a/Backend.hs
+++ b/Backend.hs
@@ -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