-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Directory.CreateDirectory: create missing parents using default UnixFileMode. #74002
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
Changes from 1 commit
b0acc3c
253e68a
daed79e
03858aa
7f3d1bd
5271907
e1cf9d4
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
- Loading branch information
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -52,7 +52,7 @@ public int Compare (string? x, string? y) | |||||
| internal static SortedDictionary<string, UnixFileMode>? CreatePendingModesDictionary() | ||||||
| => new SortedDictionary<string, UnixFileMode>(s_reverseStringComparer); | ||||||
|
|
||||||
| internal static void CreateDirectory(string fullPath, UnixFileMode? mode, bool overwriteMetadata, SortedDictionary<string, UnixFileMode>? pendingModes) | ||||||
| internal static void CreateDirectory(string fullPath, UnixFileMode? mode, SortedDictionary<string, UnixFileMode>? pendingModes) | ||||||
| { | ||||||
| // Minimal permissions required for extracting. | ||||||
| const UnixFileMode ExtractPermissions = UnixFileMode.UserRead | UnixFileMode.UserWrite | UnixFileMode.UserExecute; | ||||||
|
|
@@ -61,8 +61,8 @@ internal static void CreateDirectory(string fullPath, UnixFileMode? mode, bool o | |||||
|
|
||||||
| if (Directory.Exists(fullPath)) | ||||||
| { | ||||||
| // Apply permissions to an existing directory when we're overwriting metadata. | ||||||
| if (mode.HasValue && overwriteMetadata) | ||||||
| // Apply permissions to an existing directory. | ||||||
| if (mode.HasValue) | ||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I know
Suggested change
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
I think we're good. |
||||||
| { | ||||||
| // Ensure we have sufficient permissions to extract in the directory. | ||||||
| bool hasExtractPermissions = (mode.Value & ExtractPermissions) == ExtractPermissions; | ||||||
|
|
||||||
Uh oh!
There was an error while loading. Please reload this page.