make getViaTmpFrom no longer update location log
All callers adjusted to update it themselves. In Command.ReKey, and Command.SetKey, the cleanup action already did, so it was updating the log twice before. This fixes a bug when annex.stalldetection is set, as now Command.Transferrer can skip updating the location log, and let it be updated by the calling process.
This commit is contained in:
parent
a6ed23b82f
commit
a422a056f2
12 changed files with 33 additions and 20 deletions
|
@ -16,6 +16,7 @@
|
|||
module Logs.Location (
|
||||
LogStatus(..),
|
||||
logStatus,
|
||||
logStatusAfter,
|
||||
logChange,
|
||||
loggedLocations,
|
||||
loggedLocationsHistorical,
|
||||
|
@ -48,6 +49,16 @@ logStatus key s = do
|
|||
u <- getUUID
|
||||
logChange key u s
|
||||
|
||||
{- Run an action that gets the content of a key, and update the log
|
||||
- when it succeeds. -}
|
||||
logStatusAfter :: Key -> Annex Bool -> Annex Bool
|
||||
logStatusAfter key a = ifM a
|
||||
( do
|
||||
logStatus key InfoPresent
|
||||
return True
|
||||
, return False
|
||||
)
|
||||
|
||||
{- Log a change in the presence of a key's value in a repository. -}
|
||||
logChange :: Key -> UUID -> LogStatus -> Annex ()
|
||||
logChange = logChange' logNow
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue