From: Joey Hess Date: Mon, 25 Mar 2024 18:11:25 +0000 (-0400) Subject: fix windows transfer lock check X-Git-Tag: archive/raspbian/10.20250416-2+rpi1~1^2~25^2~59 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=62129f0b24dbfbe5d80ca53696bcc505a5b66409;p=git-annex.git fix windows transfer lock check If the lock file was not able to be exclusivlely locked, don't indicate locking failed. I'm pretty sure this was a typo. It goes all the way back to 891c85cd88c5a90daf7d18160eeddd1483e8c649 where locking was first introduced on windows, and there's no indication of why it would make sense to return True here. Sponsored-by: Leon Schuermann on Patreon --- diff --git a/Annex/Transfer.hs b/Annex/Transfer.hs index 7bf0ca365b..501faac1ed 100644 --- a/Annex/Transfer.hs +++ b/Annex/Transfer.hs @@ -171,7 +171,7 @@ runTransfer' ignorelock t eventualbackend afile stalldetection retrydecider tran createAnnexDirectory $ P.takeDirectory lck catchMaybeIO (liftIO $ lockExclusive lck) >>= \case Nothing -> return (Nothing, False) - Just Nothing -> return (Nothing, True) + Just Nothing -> return (Nothing, False) Just (Just lockhandle) -> do createtfile return (Just lockhandle, False)