add --force-small: Don't dereference link when checking file status
addSmallOverridden calls getFileStatus and then checks the result with isSymbolicLink. getFileStatus dereferences symbolic links, so isSymbolicLink will always return false (assuming the getFileStatus call doesn't fail on a broken link). Use getSymbolicLinkStatus instead.
This commit is contained in:
parent
b426ff6825
commit
339aebc6ad
1 changed files with 1 additions and 1 deletions
|
@ -107,7 +107,7 @@ addSmallOverridden :: RawFilePath -> Annex Bool
|
|||
addSmallOverridden file = do
|
||||
showNote "adding content to git repository"
|
||||
let file' = fromRawFilePath file
|
||||
s <- liftIO $ getFileStatus file'
|
||||
s <- liftIO $ getSymbolicLinkStatus file'
|
||||
if isSymbolicLink s
|
||||
then addFile file
|
||||
else do
|
||||
|
|
Loading…
Reference in a new issue