mirror of
https://github.com/hay-kot/mealie.git
synced 2025-08-22 14:33:33 -07:00
Fix FileExistsError when running Windows
This commit is contained in:
parent
cf49b87693
commit
0946d00cd5
1 changed files with 4 additions and 1 deletions
|
@ -56,7 +56,10 @@ def move_all_images():
|
|||
continue
|
||||
new_folder = app_dirs.IMG_DIR.joinpath(image_file.stem)
|
||||
new_folder.mkdir(parents=True, exist_ok=True)
|
||||
image_file.rename(new_folder.joinpath(f"original{image_file.suffix}"))
|
||||
new_file = new_folder.joinpath(f"original{image_file.suffix}")
|
||||
if new_file.is_file():
|
||||
new_file.unlink()
|
||||
image_file.rename(new_file)
|
||||
|
||||
|
||||
def migrate_images():
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue