Skip to content
Snippets Groups Projects
Commit 9e674b44 authored by Ian Lynagh's avatar Ian Lynagh
Browse files

Tweak temporary file filename chooser

parent 30c2aebe
No related branches found
No related tags found
No related merge requests found
......@@ -425,7 +425,12 @@ openTempFile' loc tmp_dir template binary = do
pid <- c_getpid
findTempName pid
where
(prefix,suffix) = break (=='.') template
-- We split off the last extension, so we can use .foo.ext files
-- for temporary files (hidden on Unix OSes). Unfortunately we're
-- below filepath in the hierarchy here.
(prefix,suffix) = case break (== '.') $ reverse template of
(rev_suffix, rev_prefix) ->
(reverse rev_prefix, reverse rev_suffix)
oflags1 = rw_flags .|. o_EXCL
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment