files with only 1 linkCount may still be unlocked

When on crippled filesystem, or without annex.thin set.
This commit is contained in:
Joey Hess 2016-02-14 17:04:09 -04:00
parent 5b51db7645
commit 74bbdfa888
Failed to extract signature

View file

@ -588,7 +588,6 @@ getKeyStatus key = ifM isDirect
( return KeyUnlocked
, catchDefaultIO KeyMissing $ do
obj <- calcRepo $ gitAnnexLocation key
unlocked <- ((> 1) . linkCount <$> liftIO (getFileStatus obj))
<&&> (not . null <$> Database.Keys.getAssociatedFiles key)
unlocked <- not . null <$> Database.Keys.getAssociatedFiles key
return $ if unlocked then KeyUnlocked else KeyLocked
)