add slash at the end

This commit is contained in:
Antonio J. Delgado 2025-05-25 10:48:45 +03:00
parent 1756d08d20
commit 174ce05c91

View file

@ -237,7 +237,7 @@ class image_classifier:
f"Copying file '{file}' to person '{person}' \
folder, '{person_path}'...")
try:
shutil.copy(file, person_path)
shutil.copy(file, f"{person_path}/")
except FileNotFoundError as error:
self._log.error(
f"Error copying. File not found. {error}"
@ -252,7 +252,7 @@ removing it..."
os.remove(full_path)
self._log.info(f"Moving file '{file}' to '{new_path}'...")
try:
shutil.move(file, new_path)
shutil.move(file, f"{new_path}/")
except FileNotFoundError as error:
self._log.error(
f"Error copying. File not found. {error}"