change to path

This commit is contained in:
Antonio J. Delgado 2022-05-02 14:28:44 +03:00
parent 73e7d2183a
commit 52ec8a8f8c

View file

@ -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)