storeExportWithContentIdentifierM :: RawFilePath -> CopyCoWTried -> FilePath -> Key -> ExportLocation -> [ContentIdentifier] -> MeterUpdate -> Annex ContentIdentifier
storeExportWithContentIdentifierM dir cow src k loc overwritablecids p = do
liftIO $ createDirectoryUnder dir (toRawFilePath destdir)
- withTmpFileIn destdir template $ \tmpf _tmph -> do
+ withTmpFileIn destdir template $ \tmpf tmph -> do
+ liftIO $ hClose tmph
fileCopierUnVerified cow src tmpf k p
let tmpf' = toRawFilePath tmpf
resetAnnexFilePerm tmpf'
--- /dev/null
+[[!comment format=mdwn
+ username="joey"
+ subject="""comment 1"""
+ date="2021-04-20T15:10:00Z"
+ content="""
+It's possible it had the same cause as the other failure, which I've now
+fixed. That involved a file handle leak, and on windows a file handle being
+left open for write is treated the same as the file being locked and will
+prevent a later deletion attempt and also a later write attempt, which
+could explain the two unlike failures.
+
+However, the file that was left open was a temp file in the remote,
+not the object file in the annex. So I'm not sure if it's fixed.
+Also possible something else in the windows code path changed accidentially
+during those CoW changes. Will have to see what happens when the
+autobuilder runs again.
+"""]]