Skip to content
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

robstewart57
Copy link
Contributor

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

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 commercialhaskell#1019

Fixes commercialhaskell#1017

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

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants