From e2d74f72dfdcc0ae2ecc1412e665f38ba38995fe Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 10 Feb 2025 15:18:10 -0400 Subject: [PATCH] fix reversions Oops, in 0b9e9cbf70c6375c8ccccdfac95b5e04ca09f891 I lost takeDirectory in several places. With this fixed, the test suite no longer utterly blows up, but still fails in 7 places due to other bugs introduced in the OsPath conversion. Sponsored-by: Graham Spencer --- Annex/Transfer.hs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Annex/Transfer.hs b/Annex/Transfer.hs index aa04ff1a25..c2fbfa5786 100644 --- a/Annex/Transfer.hs +++ b/Annex/Transfer.hs @@ -161,7 +161,7 @@ runTransfer' ignorelock t eventualbackend afile stalldetection retrydecider tran createtfile return (Just (lockhandle, Nothing), False) Just oldlckfile -> do - createAnnexDirectory oldlckfile + createAnnexDirectory $ takeDirectory oldlckfile tryLockExclusive (Just mode) oldlckfile >>= \case Nothing -> do liftIO $ dropLock lockhandle @@ -181,14 +181,14 @@ runTransfer' ignorelock t eventualbackend afile stalldetection retrydecider tran ) #else prep lckfile moldlckfile createtfile _mode = catchPermissionDenied (const prepfailed) $ do - createAnnexDirectory lckfile + createAnnexDirectory $ takeDirectory lckfile catchMaybeIO (liftIO $ lockExclusive lckfile) >>= \case Just (Just lockhandle) -> case moldlckfile of Nothing -> do createtfile return (Just (lockhandle, Nothing), False) Just oldlckfile -> do - createAnnexDirectory oldlckfile + createAnnexDirectory $ takeDirectory oldlckfile catchMaybeIO (liftIO $ lockExclusive oldlckfile) >>= \case Just (Just oldlockhandle) -> do createtfile