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)