-
Notifications
You must be signed in to change notification settings - Fork 5k
[HotFix] Fix create parent directory will cause FileAlreadyExistsException #15576
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
[HotFix] Fix create parent directory will cause FileAlreadyExistsException #15576
Conversation
551a243 to
c2a33cd
Compare
rickchengx
left a comment
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.
LGTM
fuchanghai
left a comment
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.
LGTM
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## dev #15576 +/- ##
============================================
- Coverage 38.53% 38.53% -0.01%
Complexity 4766 4766
============================================
Files 1305 1305
Lines 44838 44841 +3
Branches 4806 4806
============================================
+ Hits 17278 17279 +1
- Misses 25684 25686 +2
Partials 1876 1876 ☔ View full report in Codecov by Sentry. |
| Files.createDirectory(path); | ||
| Files.setPosixFilePermissions(path, PERMISSION_755); | ||
| try { | ||
| Files.createDirectory(path); |
Check failure
Code scanning / CodeQL
Uncontrolled data used in path expression
| Files.setPosixFilePermissions(path, PERMISSION_755); | ||
| } catch (FileAlreadyExistsException fileAlreadyExistsException) { | ||
| // Catch the FileAlreadyExistsException here to avoid create the same parent directory in parallel | ||
| log.debug("The directory: {} already exists", path); |
Check failure
Code scanning / CodeQL
Log Injection
|
…5576) Co-authored-by: Rick Cheng <[email protected]> (cherry picked from commit 4541e74)

Purpose of the pull request
Brief change log
Verify this pull request
This pull request is code cleanup without any test coverage.
(or)
This pull request is already covered by existing tests, such as (please describe tests).
(or)
This change added tests and can be verified as follows:
(or)
If your pull request contain incompatible change, you should also add it to
docs/docs/en/guide/upgrede/incompatible.md