semmyk commited on
Commit
aab6bfe
·
1 Parent(s): 1e1746d

fix: if not file_path.exists() - dir_path.mkdir(parents=True, exist_ok=True) #, mode=0o2644)

Browse files
Files changed (1) hide show
  1. file_handler/file_utils.py +1 -1
file_handler/file_utils.py CHANGED
@@ -45,7 +45,7 @@ def check_create_file(filename: str, dir_path: Union[str, Path]="logs") -> Path:
45
  # Create the parent directory if it doesn't exist.
46
  # `parents=True` creates any missing parent directories.
47
  # `exist_ok=True` prevents an error if the directory already exists.
48
- dir_path.mkdir(parents=True, exist_ok=True, mode=0o2644)
49
 
50
  file_path = dir_path / filename # Concatenate directory and filename to get full path
51
  if not file_path.exists(): # Create the file if it doesn't exist
 
45
  # Create the parent directory if it doesn't exist.
46
  # `parents=True` creates any missing parent directories.
47
  # `exist_ok=True` prevents an error if the directory already exists.
48
+ dir_path.mkdir(parents=True, exist_ok=True) #, mode=0o2644)
49
 
50
  file_path = dir_path / filename # Concatenate directory and filename to get full path
51
  if not file_path.exists(): # Create the file if it doesn't exist