summaryrefslogtreecommitdiff
path: root/Backend.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2012-05-31 21:03:24 -0400
committerGravatar Joey Hess <joey@kitenet.net>2012-05-31 21:03:24 -0400
commit6fd83851c13232b7810a33e8bb1d83e8a46bd354 (patch)
tree6144bcf207fd3867c54a4bcde35fe82bcc912c95 /Backend.hs
parentd4a95faeb2786027e13cc3f49825a6b4ad231768 (diff)
Fix display of warning message when encountering a file that uses an unsupported backend.
Diffstat (limited to 'Backend.hs')
-rw-r--r--Backend.hs8
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 ++