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

Try to avoid creating temp dirs in the current working directory #571

Merged
merged 1 commit into from
Dec 23, 2021
Merged

Try to avoid creating temp dirs in the current working directory #571

merged 1 commit into from
Dec 23, 2021

Conversation

gschaffner
Copy link
Contributor

Try to use mktemp -d before falling back to calling mktemp with an explicit template (for compat. with some BSD variants of mktemp (see #176)).

Testing shows shows that this fixes temp dirs being created in the current working directory on systems using a recent current GNU coreutils mktemp variant and on systems using the mktemp variant packaged with some macOS versions (e.g. 10.15). This may also fix the issue on other systems as well (see https://stackoverflow.com/a/2792789).

(Oddly, this fixes the issue on macOS 10.15, but not on macOS 11.6, which does not have the issue in the first place despite mktemp having an identical man page on 10.15 and 11.6.)

Try to use `mktemp -d` before falling back to calling mktemp with an
explicit template (for compat. with some BSD variants of mktemp
(see #176)).

Testing shows shows that this fixes temp dirs being created in the
current working directory on systems using a recent current GNU
coreutils mktemp variant and on systems using the mktemp variant
packaged with some macOS versions (e.g. 10.15). This may also fix the
issue on other systems as well (see
https://stackoverflow.com/a/2792789).
@coveralls
Copy link

Coverage Status

Coverage decreased (-0.02%) to 82.248% when pulling 36b05f9 on gschaffner:mktemp into a11ba7f on tomerfiliba:master.

@henryiii henryiii merged commit 71a9887 into tomerfiliba:master Dec 23, 2021
@henryiii
Copy link
Collaborator

Thanks!

iccucci pushed a commit to iccucci/iccucci that referenced this pull request Jan 28, 2022
iccucci pushed a commit to nestlin/rpyc that referenced this pull request Jan 28, 2022
nestlin pushed a commit to nestlin/rpyc that referenced this pull request Mar 15, 2022
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.

3 participants