diff --git a/image_classifier/image_classifier.py b/image_classifier/image_classifier.py index 007ec55..10df9db 100755 --- a/image_classifier/image_classifier.py +++ b/image_classifier/image_classifier.py @@ -69,14 +69,14 @@ class image_classifier: move it to the folder of the day''' self._log.debug(f"Looking for faces in file '{file}'...") new_path = False + dirname = os.path.dirname(os.path.realpath(file)) + filename = os.path.basename(file) if not os.access(file, os.R_OK): self._log.error(f"The file '{file}' is not readable.") else: if self.is_image(file): self.metadata = pyexiv2.ImageMetadata(file) self.metadata.read() - dirname = os.path.dirname(os.path.realpath(file)) - filename = os.path.basename(file) people = self.find_faces(file) if people: self._log.debug(f"Found {len(people)} known people in the image.")