close handle so windows can stat the file
windows cannot stat a file that another process has open, which caused this to crash with an exception
This commit is contained in:
parent
3049271fd0
commit
386c0ce90a
2 changed files with 4 additions and 0 deletions
|
@ -404,6 +404,7 @@ storeExportWithContentIdentifierM dir src _k loc overwritablecids p =
|
|||
withTmpFileIn destdir template $ \tmpf tmph -> do
|
||||
liftIO $ withMeteredFile src p (L.hPut tmph)
|
||||
liftIO $ hFlush tmph
|
||||
liftIO $ hClose tmph
|
||||
liftIO (getFileStatus tmpf) >>= liftIO . mkContentIdentifier tmpf >>= \case
|
||||
Nothing ->
|
||||
return $ Left "unable to generate content identifier"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue