fix reversion

af3b9cbd36 lost takeFileName, breaking the
test suite
This commit is contained in:
Joey Hess 2025-01-22 16:28:29 -04:00
parent 6e27b0d4d1
commit d3de3c28eb
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38

View file

@ -57,7 +57,7 @@ replaceFile createdirectory file action = replaceFile' createdirectory file (con
replaceFile' :: (RawFilePath -> Annex ()) -> RawFilePath -> (a -> Bool) -> (RawFilePath -> Annex a) -> Annex a
replaceFile' createdirectory file checkres action = withOtherTmp $ \othertmpdir -> do
let basetmp = relatedTemplate' file
let basetmp = relatedTemplate' (P.takeFileName file)
withTmpDirIn (fromRawFilePath othertmpdir) (toOsPath basetmp) $ \tmpdir -> do
let tmpfile = toRawFilePath tmpdir P.</> basetmp
r <- action tmpfile