This is an automated email from the ASF dual-hosted git repository.
sbp pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tooling-trusted-release.git
The following commit(s) were added to refs/heads/main by this push:
new c6ebe75 Ensure that directory permissions are set correctly
c6ebe75 is described below
commit c6ebe75671a9850683604ee5810b5e5ac3f88647
Author: Sean B. Palmer <[email protected]>
AuthorDate: Tue Jun 17 19:10:24 2025 +0100
Ensure that directory permissions are set correctly
---
atr/server.py | 14 ++++++++++----
1 file changed, 10 insertions(+), 4 deletions(-)
diff --git a/atr/server.py b/atr/server.py
index 61fda26..6b8e485 100644
--- a/atr/server.py
+++ b/atr/server.py
@@ -77,10 +77,16 @@ def app_dirs_setup(app_config: type[config.AppConfig]) ->
None:
raise RuntimeError(f"State directory not found:
{app_config.STATE_DIR}")
os.chdir(app_config.STATE_DIR)
print(f"Working directory changed to: {os.getcwd()}")
- util.get_downloads_dir().mkdir(parents=True, exist_ok=True)
- util.get_finished_dir().mkdir(parents=True, exist_ok=True)
- util.get_tmp_dir().mkdir(parents=True, exist_ok=True)
- util.get_unfinished_dir().mkdir(parents=True, exist_ok=True)
+
+ directories_to_ensure = [
+ util.get_downloads_dir(),
+ util.get_finished_dir(),
+ util.get_tmp_dir(),
+ util.get_unfinished_dir(),
+ ]
+ for directory in directories_to_ensure:
+ directory.mkdir(parents=True, exist_ok=True)
+ util.chmod_directories(directory, permissions=0o755)
def app_setup_api_docs(app: base.QuartApp) -> None:
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]