diff options
Diffstat (limited to 'Backend.hs')
-rw-r--r-- | Backend.hs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Backend.hs b/Backend.hs index 8071b9b83..fa3266944 100644 --- a/Backend.hs +++ b/Backend.hs @@ -75,16 +75,16 @@ genKey' (b:bs) file = do - by examining what the file symlinks to. -} lookupFile :: FilePath -> Annex (Maybe (Key, Backend)) lookupFile file = do - tl <- liftIO $ tryIO getsymlink + tl <- liftIO $ tryIO $ readSymbolicLink file case tl of Left _ -> return Nothing Right l -> makekey l where - getsymlink = takeFileName <$> readSymbolicLink file - makekey l = maybe (return Nothing) (makeret l) (fileKey l) + makekey l = maybe (return Nothing) (makeret l) (fileKey $ takeFileName l) makeret l k = let bname = keyBackendName k in case maybeLookupBackendName bname of - Just backend -> return $ Just (k, backend) + Just backend -> do + return $ Just (k, backend) Nothing -> do when (isLinkToAnnex l) $ warning $ "skipping " ++ file ++ |