Spaces:
Sleeping
Sleeping
file_utils: oops writable_dir.mkdir()
Browse files
file_handler/file_utils.py
CHANGED
|
@@ -50,7 +50,7 @@ def check_create_logfile(filename: str, dir_path: Union[str, Path]="logs") -> Pa
|
|
| 50 |
writable_dir = Path("/data")
|
| 51 |
try:
|
| 52 |
if not writable_dir.is_dir():
|
| 53 |
-
|
| 54 |
except PermissionError: ##[Errno 13] Permission denied: '/home/user/app/logs/app_logging_2025-09-18.log'
|
| 55 |
warnings.warn("[Errno 13] Permission denied, possibly Persistent Storage not enable: attempting temp folder")
|
| 56 |
writable_dir = Path(tempfile.gettempdir()) #
|
|
|
|
| 50 |
writable_dir = Path("/data")
|
| 51 |
try:
|
| 52 |
if not writable_dir.is_dir():
|
| 53 |
+
writable_dir.mkdir(exist_ok=True)
|
| 54 |
except PermissionError: ##[Errno 13] Permission denied: '/home/user/app/logs/app_logging_2025-09-18.log'
|
| 55 |
warnings.warn("[Errno 13] Permission denied, possibly Persistent Storage not enable: attempting temp folder")
|
| 56 |
writable_dir = Path(tempfile.gettempdir()) #
|