semmyk commited on
Commit
c1f3308
·
1 Parent(s): 5c20cd0

fix: file.utils create logging file

Browse files
Files changed (1) hide show
  1. file_handler/file_utils.py +1 -1
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.mkdir(mode=0o2644, parents=True, exist_ok=True) ##SMY: create nested path if not exists
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