fix logic errors in code that determines if it's time for v10 upgrade
This would have prevented old git-annex from ever upgrading from v9 to v10. Note that a manual `git-annex upgrade` can never run while the assistant is running, so not <$> assistantrunning was always True, so no matter what the timestamp of the v9 upgrade in the log, it would decide there was old process danger. Sponsored-by: Jack Hill on Patreon
This commit is contained in:
parent
a6ff335f0b
commit
61b55d62d7
1 changed files with 2 additions and 2 deletions
|
@ -43,9 +43,9 @@ upgrade automatic
|
||||||
Nothing -> pure True
|
Nothing -> pure True
|
||||||
Just t -> do
|
Just t -> do
|
||||||
now <- liftIO getPOSIXTime
|
now <- liftIO getPOSIXTime
|
||||||
if now - 365*24*60*60 > t
|
if now < t + 365*24*60*60
|
||||||
then return True
|
then return True
|
||||||
else not <$> assistantrunning
|
else assistantrunning
|
||||||
|
|
||||||
{- Skip upgrade when git-annex assistant (or watch) is running,
|
{- Skip upgrade when git-annex assistant (or watch) is running,
|
||||||
- because these are long-running daemons that could conceivably
|
- because these are long-running daemons that could conceivably
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue