Stebalien / tempfile

Temporary file library for rust
http://stebalien.com/projects/tempfile-rs
Apache License 2.0
1.2k stars 120 forks source link

Clarify Builder::permissions documentation on defaults for temporary directories #284

Closed Imberflur closed 3 months ago

Imberflur commented 4 months ago

The documentation notes:

The permissions to create the tempfile or tempdir with. This allows to them differ from the default mode of 0o600 on Unix.

I read this as tempdirs defaulting to 0o600, but in the implementation it looks like this default is only applied for tempfiles, not tempdirs?

(sidenote: it looks like there was a suggestion in https://github.com/Stebalien/tempfile/issues/114 to make the default 0700 for directories)

Stebalien commented 4 months ago

Hm, you're right. It would be good to both fix those docs and document the default mode. Could you submit a patch to fix the docs?

I'd like to change the default mode, but that'll require a 4.0 release. I've added it to the list (https://github.com/Stebalien/tempfile/issues/258).