diff options
author | Joey Hess <joey@kitenet.net> | 2011-01-27 16:10:45 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2011-01-27 16:10:45 -0400 |
commit | 96404170673e4ff42b68de1ba967a09a88dd550e (patch) | |
tree | 0f9b21755a8b254cf5dca5bd2a2935beba0b6710 /Locations.hs | |
parent | 56a8a2117161b7ce10272777182ef20bf4c5b3ce (diff) |
avoid warning when symlink in the repo contains a colon but is not a
pointer to annexed content
Diffstat (limited to 'Locations.hs')
-rw-r--r-- | Locations.hs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Locations.hs b/Locations.hs index 6c541e937..327c099e3 100644 --- a/Locations.hs +++ b/Locations.hs @@ -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 |