mirror of
https://github.com/greflm13/StaticGalleryBuilder.git
synced 2026-02-05 11:09:26 +00:00
os.rename → shutil.move
This commit is contained in:
@@ -91,7 +91,7 @@ def generate_thumbnail(arguments: Tuple[str, str, str, bool]) -> None:
|
|||||||
oldpath = os.path.join(root_directory, ".thumbnails", folder.removeprefix(root_directory), os.path.splitext(item)[0]) + ".jpg"
|
oldpath = os.path.join(root_directory, ".thumbnails", folder.removeprefix(root_directory), os.path.splitext(item)[0]) + ".jpg"
|
||||||
if os.path.exists(oldpath):
|
if os.path.exists(oldpath):
|
||||||
try:
|
try:
|
||||||
os.rename(oldpath, path)
|
shutil.move(oldpath, path)
|
||||||
except FileNotFoundError:
|
except FileNotFoundError:
|
||||||
pass
|
pass
|
||||||
if not os.path.exists(path) or regenerate_thumbnails:
|
if not os.path.exists(path) or regenerate_thumbnails:
|
||||||
|
|||||||
Reference in New Issue
Block a user