diff options
author | Joey Hess <joeyh@joeyh.name> | 2015-05-19 14:26:07 -0400 |
---|---|---|
committer | Joey Hess <joeyh@joeyh.name> | 2015-05-19 14:26:07 -0400 |
commit | a5351d739d86513973b82aaabe58f7d1c5f829ea (patch) | |
tree | 608e3f38da179aa2af4d1e46d0cb43f29dfb88fb /Annex | |
parent | 2e819796cdfdfccb2ebef7b10e2653e58d832d83 (diff) |
fix inAnnexSafe result for direct file that is being dropped
It was returning Just False in this situation, which differed from indirect
mode behavior. I don't think this led to any actual problems; things that
checked if the file being dropped was present just failed to fail, and
instead reported it wasn't present, possibly incorrectly.
Hmm, it's possible that this could have made git annex fsck --from remote
update the location log wrongly, if a remote was in direct mode, and was in
the middle of trying to drop a key, and the drop later failed.
Diffstat (limited to 'Annex')
-rw-r--r-- | Annex/Content.hs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Annex/Content.hs b/Annex/Content.hs index ad570ee4e..c23d7e951 100644 --- a/Annex/Content.hs +++ b/Annex/Content.hs @@ -94,7 +94,7 @@ inAnnex' isgood bad check key = withObjectLoc key checkindirect checkdirect {- A safer check; the key's content must not only be present, but - is not in the process of being removed. -} inAnnexSafe :: Key -> Annex (Maybe Bool) -inAnnexSafe key = inAnnex' (fromMaybe False) (Just False) go key +inAnnexSafe key = inAnnex' (fromMaybe True) (Just False) go key where is_locked = Nothing is_unlocked = Just True |