avoid reading files that are not symlinks when core.symlinks=false
This hack is only needed on FAT filesystems, so there's no point in doing it the rest of the time. And it's possible for there to be a false positive, so it's best to avoid the hack when possible.
This commit is contained in:
parent
9fc1448947
commit
ae341c1a37
1 changed files with 5 additions and 2 deletions
|
@ -36,10 +36,13 @@ isAnnexLink file = maybe Nothing (fileKey . takeFileName) <$> getAnnexLinkTarget
|
|||
- content.
|
||||
-}
|
||||
getAnnexLinkTarget :: FilePath -> Annex (Maybe LinkTarget)
|
||||
getAnnexLinkTarget file =
|
||||
check readSymbolicLink $
|
||||
getAnnexLinkTarget file = ifM (coreSymlinks <$> Annex.getGitConfig)
|
||||
( check readSymbolicLink $
|
||||
check readfilestart $
|
||||
return Nothing
|
||||
, check readSymbolicLink $
|
||||
return Nothing
|
||||
)
|
||||
where
|
||||
check getlinktarget fallback = do
|
||||
v <- liftIO $ catchMaybeIO $ getlinktarget file
|
||||
|
|
Loading…
Add table
Reference in a new issue