From 174ce05c917a4de4a7bed19af9cc5de26b585440 Mon Sep 17 00:00:00 2001 From: "Antonio J. Delgado" Date: Sun, 25 May 2025 10:48:45 +0300 Subject: [PATCH] add slash at the end --- image_classifier/image_classifier.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/image_classifier/image_classifier.py b/image_classifier/image_classifier.py index 60306f1..a58e013 100755 --- a/image_classifier/image_classifier.py +++ b/image_classifier/image_classifier.py @@ -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}"