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

Consider returning /private/tmp instead of /tmp on macOS with std::env::temp_dir() #99608

Open
poliorcetics opened this issue Jul 22, 2022 · 2 comments · May be fixed by #100824
Open

Consider returning /private/tmp instead of /tmp on macOS with std::env::temp_dir() #99608

poliorcetics opened this issue Jul 22, 2022 · 2 comments · May be fixed by #100824
Labels
O-macos Operating system: macOS T-libs-api Relevant to the library API team, which will review and decide on the PR/issue.

Comments

@poliorcetics
Copy link
Contributor

poliorcetics commented Jul 22, 2022

The first is a regular directory, the second is a symlink to the first. This can lead to software failing in strange and unexpected ways (especially during testing, with the tempfile crate or similar) if symlinks are forbidden, e.g. I recently encountered the case with SQLite

Since /tmp -> /private/tmp software that was already working correctly should not start to fail unexpectedly. Software that was failing/had to workaround this will start working correctly.

macos-12.4 $ /bin/ls -la /tmp
lrwxr-xr-x@ 1 root  wheel  11  9 mai 23:30 /tmp -> private/tmp
@poliorcetics poliorcetics changed the title Consider returning /private/tmp instead of `tmp Consider returning /private/tmp instead of /tmp on macOS with std::env::temp_dir() Jul 22, 2022
devnexen added a commit to devnexen/rust that referenced this issue Aug 6, 2022
@clubby789
Copy link
Contributor

@rustbot label +T-libs-api +O-macos

@rustbot rustbot added O-macos Operating system: macOS T-libs-api Relevant to the library API team, which will review and decide on the PR/issue. labels Mar 31, 2023
@edmorley
Copy link
Contributor

See also #100196 and #100824.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
O-macos Operating system: macOS T-libs-api Relevant to the library API team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants