From 52ec8a8f8c69c53fa810f9629b07aac089be6502 Mon Sep 17 00:00:00 2001 From: "Antonio J. Delgado" Date: Mon, 2 May 2022 14:28:44 +0300 Subject: [PATCH] change to path --- image_classifier/image_classifier.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/image_classifier/image_classifier.py b/image_classifier/image_classifier.py index edf1e81..238c8ca 100755 --- a/image_classifier/image_classifier.py +++ b/image_classifier/image_classifier.py @@ -109,9 +109,9 @@ class image_classifier: {match.group('day')}" else: folder = 'unknown-time' - new_path = os.path.join(dirname, folder, filename) - if not os.path.exists(os.path.dirname(new_path)): - os.makedirs(os.path.dirname(new_path)) + new_path = os.path.join(dirname, folder) + if not os.path.exists(new_path): + os.makedirs(new_path) if self.people_folder: for person in people: person_path = os.path.join(self.people_folder, person, folder)