New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Canonicalizes temporary directory paths #1047

Merged
merged 1 commit into from Sep 27, 2015

Conversation

Projects
None yet
2 participants
@robstewart57
Contributor

robstewart57 commented Sep 24, 2015

When the $TMPDIR environment variable is set, the directory paths
provided by withSystemTempDirectory and withTempDirectory from
System.IO.Temp provided by the temporary library are not
canonicalised. This commit wraps these functions into canonicalized
versions.

See an earlier PR for discussion #1019

Fixes #1017

Canonicalizes temporary directory paths
When the $TMPDIR environment variable is set, the directory paths
provided by `withSystemTempDirectory` and `withTempDirectory` from
System.IO.Temp provided by the temporary library are not
canonicalised. This commit wraps these functions into canonicalized
versions.

See an earlier PR for discussion #1019

Fixes #1017

@robstewart57 robstewart57 force-pushed the robstewart57:master branch from 0704d0c to cf6d1cf Sep 24, 2015

withCanonicalizedSystemTempDirectory :: (MonadMask m, MonadIO m)
=> String -- ^ Directory name template.
-> (FilePath -> m a) -- ^ Callback that can use the canonicalized directory

This comment has been minimized.

@snoyberg

snoyberg Sep 25, 2015

Contributor

I'd actually been thinking this would be a Path Abs Dir, to make it fit in with the rest of this module and avoid the need for the parseAbsDir in all of the call sites.

@snoyberg snoyberg merged commit cf6d1cf into commercialhaskell:master Sep 27, 2015

2 checks passed

continuous-integration/appveyor AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment