Fix display of warning message when encountering a file that uses an unsupported backend.
This commit is contained in:
parent
d4a95faeb2
commit
6fd83851c1
3 changed files with 9 additions and 5 deletions
|
@ -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 ++
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue