Compare commits
7 Commits
6506017743
...
7f75afcbc5
| Author | SHA1 | Date | |
|---|---|---|---|
| 7f75afcbc5 | |||
| 94f92606a6 | |||
| ea9d6f2e51 | |||
| b48667bfa0 | |||
| 533ee1c1a9 | |||
| cf50818f28 | |||
| dd3d3ffc82 |
@ -62,7 +62,10 @@ def make_file_path(dir_path: Path,
|
|||||||
Create a file_path for the given directory using the
|
Create a file_path for the given directory using the
|
||||||
given file_suffix and ID generator function.
|
given file_suffix and ID generator function.
|
||||||
"""
|
"""
|
||||||
return dir_path / f"{next_fid():04d}{file_suffix}"
|
file_path = dir_path / f"{next_fid():04d}{file_suffix}"
|
||||||
|
while file_path.exists():
|
||||||
|
file_path = dir_path / f"{next_fid():04d}{file_suffix}"
|
||||||
|
return file_path
|
||||||
|
|
||||||
|
|
||||||
def write_dir(dir_path: Path,
|
def write_dir(dir_path: Path,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user