Skip to content

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

Closed

Description

@poliorcetics

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

Activity

  1. changed the title [-]Consider returning `/private/tmp` instead of `tmp[/-] [+]Consider returning `/private/tmp` instead of `/tmp` on macOS with `std::env::temp_dir()`[/+] on Jul 22, 2022
  2. clubby789 commented on Mar 31, 2023

    @clubby789
    Contributor

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

  3. edmorley commented on Nov 13, 2023

    @edmorley
    Contributor

    See also #100196 and #100824.

  4. added 3 commits that reference this issue on Nov 22, 2024
  5. added a commit that references this issue on Nov 23, 2024
  6. added a commit that references this issue on Nov 23, 2024
  7. added a commit that references this issue on Nov 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    O-macosOperating system: macOST-libs-api[DEPRECATED; DO NOT USE]

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions