Revert "stages/mkdir: explicitly set mode using os.chmod"

This reverts commit a988aacf99.

After some discussion, the original behavior was intentional. With the
added support for gracefully handling the existence of directories, the
stage would originally not set the mode of an existing directory, while
now it will. Additional issue is that `mkdir` applies the provided mode
- umask, which was intentional. Setting the same mode without taking
umask value into account is not desired.
This commit is contained in:
Tomáš Hozza 2023-01-20 11:29:34 +01:00 committed by Achilleas Koutsou
parent 58579b62e9
commit d3a63cf056
2 changed files with 1 additions and 6 deletions

View file

@ -70,11 +70,6 @@ def main(tree, options):
if not exist_ok:
raise
# Documentation for os.mkdir() says that the mode is
# ignored on some systems. Also umask value may affect
# the final mode. So we set the mode explicitly.
os.chmod(target, mode, follow_symlinks=False)
return 0

View file

@ -6,5 +6,5 @@
"/b/c/d"
],
"deleted_files": [],
"differences": {"/c": {"mode": [16877, 16832]}}
"differences": {}
}