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
make-temporary-{file,directory}{,*}: add #:permissions #4126
base: master
Are you sure you want to change the base?
make-temporary-{file,directory}{,*}: add #:permissions #4126
Conversation
So far, I don't think Adding Meanwhile, the problem with permissions on the intermediate file state in |
This commit depends on racket#3870 and a hypothetical `#:permissions` argument to `copy-file`, where `(copy-file #:permissions #f . args)` would be the default and preserve the current behavior, i.e. copying the permissions of the source file. For more thoughts on changes to `copy-file`, see: <racket#3870 (comment)> and <racket#3870 (comment)>. Before merging, it would also need to add tests.
e74a6bd
to
2f6701a
Compare
I've rebased, since #3870 was merged, but I haven't tackled the test failures of other issues.
I don't have a strong view on permissions for The option I like the least is having
Intuitively, this seems reasonable to me, with the caveat that making temporary files seems to involve a lot of thorny intuitive issues. I don't remember having seen another language with a combined operation to make a temporary file by copying. Would this change the handling of extended attributes? If the source file has execute permissions, would it be an issue to have the execute permission set on the partial copy? I guess I could imagine initializing the copy with minimal permissions (i.e. only |
This pull request has been mentioned on Racket Discussions. There might be relevant details there: https://racket.discourse.group/t/umask-set-default-file-permissions/613/6 |
I was reminded by #4357 of the idea of |
I think a change analogous to 0ddb776 should fix this, and I hope to try that relatively soon. |
This commit depends on #3870 and a hypothetical
#:permissions
argument tocopy-file
,where(copy-file #:permissions #f . args)
would be the default and preserve the current behavior, i.e. copying the permissions of the source file.For more thoughts on changes to
copy-file
, see: #3870 (comment) and #3870 (comment).Before merging, it would also need to add tests.