diff options
author | Aarni Koskela <akx@iki.fi> | 2023-05-29 07:18:15 +0000 |
---|---|---|
committer | Aarni Koskela <akx@iki.fi> | 2023-06-13 09:35:43 +0000 |
commit | 165ab44f03cc17dc3e4c35b3e5976f3d646c7ac7 (patch) | |
tree | 03d056078cd1c7c3113e81b2bc84dd8c91ce93af /modules/modelloader.py | |
parent | 59419bd64a1581caccaac04dceb66c1c069a2db1 (diff) | |
download | stable-diffusion-webui-gfx803-165ab44f03cc17dc3e4c35b3e5976f3d646c7ac7.tar.gz stable-diffusion-webui-gfx803-165ab44f03cc17dc3e4c35b3e5976f3d646c7ac7.tar.bz2 stable-diffusion-webui-gfx803-165ab44f03cc17dc3e4c35b3e5976f3d646c7ac7.zip |
Use os.makedirs(..., exist_ok=True)
Diffstat (limited to 'modules/modelloader.py')
-rw-r--r-- | modules/modelloader.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/modules/modelloader.py b/modules/modelloader.py index be23071a..75f01247 100644 --- a/modules/modelloader.py +++ b/modules/modelloader.py @@ -95,8 +95,7 @@ def cleanup_models(): def move_files(src_path: str, dest_path: str, ext_filter: str = None): try: - if not os.path.exists(dest_path): - os.makedirs(dest_path) + os.makedirs(dest_path, exist_ok=True) if os.path.exists(src_path): for file in os.listdir(src_path): fullpath = os.path.join(src_path, file) |