fix temp filename
Was not putting it inside the temp dir, but next to it! This was just wrong, and it led to a longer filename that desired being used, leading to some bug reports.
This commit is contained in:
parent
6e71094e7d
commit
2936153fc4
6 changed files with 43 additions and 1 deletions
|
@ -30,7 +30,7 @@ replaceFile file action = do
|
|||
filemax <- liftIO $ fileNameLengthLimit misctmpdir
|
||||
let basetmp = take (filemax `div` 2) (takeFileName file)
|
||||
withTmpDirIn misctmpdir basetmp $ \tmpdir -> do
|
||||
let tmpfile = tmpdir <> basetmp
|
||||
let tmpfile = tmpdir </> basetmp
|
||||
action tmpfile
|
||||
liftIO $ replaceFileFrom tmpfile file
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue