diff options
Diffstat (limited to 'Locations.hs')
-rw-r--r-- | Locations.hs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Locations.hs b/Locations.hs index 46a85e0ee..db456388a 100644 --- a/Locations.hs +++ b/Locations.hs @@ -155,7 +155,9 @@ gitAnnexRemotesDir r = addTrailingPathSeparator $ gitAnnexDir r </> "remotes" {- Checks a symlink target to see if it appears to point to annexed content. -} isLinkToAnnex :: FilePath -> Bool -isLinkToAnnex s = ("/.git/" ++ objectDir) `isInfixOf` s +isLinkToAnnex s = ("/" ++ d) `isInfixOf` s || d `isPrefixOf` s + where + d = ".git" </> objectDir {- Converts a key into a filename fragment without any directory. - |