Spaces:
Sleeping
Sleeping
fix: file.utils create logging file
Browse files
file_handler/file_utils.py
CHANGED
|
@@ -34,7 +34,7 @@ def check_create_paths(file_dir: Union[str, Path]) -> List[Path]:
|
|
| 34 |
file_dir = Path("logs") / file_dir if not isinstance(file_dir, Path) else Path(file_dir)
|
| 35 |
if not file_dir.exists():
|
| 36 |
##SMY: [resolved] Permission Errno13 - https://stackoverflow.com/a/57454275
|
| 37 |
-
file_dir.
|
| 38 |
file_dir.chmod(0)
|
| 39 |
|
| 40 |
return file_dir
|
|
|
|
| 34 |
file_dir = Path("logs") / file_dir if not isinstance(file_dir, Path) else Path(file_dir)
|
| 35 |
if not file_dir.exists():
|
| 36 |
##SMY: [resolved] Permission Errno13 - https://stackoverflow.com/a/57454275
|
| 37 |
+
file_dir.touch(mode=0o2644, exist_ok=True) #, parents=True) ##SMY: create file if not exists
|
| 38 |
file_dir.chmod(0)
|
| 39 |
|
| 40 |
return file_dir
|