-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Filesystem] Check that directory is writable after created it in dumpFile() #21200
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
Conversation
} elseif (!is_writable($dir)) { | ||
} | ||
|
||
if (!is_writable($dir)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this check is already bundled into file_put_contents' failure handling. You're just making this case more explicit, but file_put_contents can fail for more reasons.
So, should it be considered a new feature? Should we use error_get_last to generate a more useful error message? should this go on master?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The handling was already there before. It just didn't take into account that the directory could have been created by another process.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
got it :)
👍 |
👍 Status: Reviewed |
👍 |
Thank you @chalasr. |
…d it in dumpFile() (chalasr) This PR was merged into the 2.7 branch. Discussion ---------- [Filesystem] Check that directory is writable after created it in dumpFile() | Q | A | ------------- | --- | Branch? | 2.7 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | #20612 (comment) | License | MIT | Doc PR | n/a In case permissions have been changed meanwhile Commits ------- dbc4148 [Filesystem] Check that the directory is writable after created it in dumpFile()
In case permissions have been changed meanwhile