fix reversions

Oops, in 0b9e9cbf70 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
This commit is contained in:
Joey Hess 2025-02-10 15:18:10 -04:00
parent c730d00b6e
commit e2d74f72df
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38

View file

@ -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