avoid warning when symlink in the repo contains a colon but is not a
pointer to annexed content
This commit is contained in:
parent
56a8a21171
commit
9640417067
2 changed files with 8 additions and 1 deletions
|
@ -137,7 +137,8 @@ lookupFile file = do
|
|||
makekey bs l = do
|
||||
case maybeLookupBackendName bs bname of
|
||||
Nothing -> do
|
||||
unless (null kname || null bname) $
|
||||
unless (null kname || null bname ||
|
||||
not (isLinkToAnnex l)) $
|
||||
warning skip
|
||||
return Nothing
|
||||
Just backend -> return $ Just (k, backend)
|
||||
|
|
|
@ -15,6 +15,7 @@ module Locations (
|
|||
annexTmpLocation,
|
||||
annexBadLocation,
|
||||
annexUnusedLog,
|
||||
isLinkToAnnex,
|
||||
annexDir,
|
||||
annexObjectDir,
|
||||
|
||||
|
@ -22,6 +23,7 @@ module Locations (
|
|||
) where
|
||||
|
||||
import Data.String.Utils
|
||||
import Data.List
|
||||
|
||||
import Types
|
||||
import qualified GitRepo as Git
|
||||
|
@ -69,6 +71,10 @@ annexBadLocation r = annexDir r ++ "/bad/"
|
|||
annexUnusedLog :: Git.Repo -> FilePath
|
||||
annexUnusedLog r = annexDir r ++ "/unused"
|
||||
|
||||
{- Checks a symlink target to see if it appears to point to annexed content. -}
|
||||
isLinkToAnnex :: FilePath -> Bool
|
||||
isLinkToAnnex s = isInfixOf "/.git/annex/objects/" s
|
||||
|
||||
{- Converts a key into a filename fragment.
|
||||
-
|
||||
- Escape "/" in the key name, to keep a flat tree of files and avoid
|
||||
|
|
Loading…
Reference in a new issue