use relatedTempate in viaTmp
This commit is contained in:
parent
3cd19fb4d0
commit
1ec9e1494c
1 changed files with 1 additions and 1 deletions
|
@ -28,7 +28,7 @@ viaTmp :: (MonadMask m, MonadIO m) => (FilePath -> v -> m ()) -> FilePath -> v -
|
||||||
viaTmp a file content = bracketIO setup cleanup use
|
viaTmp a file content = bracketIO setup cleanup use
|
||||||
where
|
where
|
||||||
(dir, base) = splitFileName file
|
(dir, base) = splitFileName file
|
||||||
template = base ++ ".tmp"
|
template = relatedTemplate (base ++ ".tmp")
|
||||||
setup = do
|
setup = do
|
||||||
createDirectoryIfMissing True dir
|
createDirectoryIfMissing True dir
|
||||||
openTempFile dir template
|
openTempFile dir template
|
||||||
|
|
Loading…
Reference in a new issue