From 61b55d62d7d874c2a8734159c08a7f8302ebb235 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 25 Jul 2022 15:56:33 -0400 Subject: [PATCH] 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 --- Upgrade/V9.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Upgrade/V9.hs b/Upgrade/V9.hs index 06e2c55859..61f256e24c 100644 --- a/Upgrade/V9.hs +++ b/Upgrade/V9.hs @@ -43,9 +43,9 @@ upgrade automatic Nothing -> pure True Just t -> do now <- liftIO getPOSIXTime - if now - 365*24*60*60 > t + if now < t + 365*24*60*60 then return True - else not <$> assistantrunning + else assistantrunning {- Skip upgrade when git-annex assistant (or watch) is running, - because these are long-running daemons that could conceivably