fix person path to folder
This commit is contained in:
parent
800eaa0915
commit
73e7d2183a
1 changed files with 3 additions and 3 deletions
|
@ -114,9 +114,9 @@ class image_classifier:
|
|||
os.makedirs(os.path.dirname(new_path))
|
||||
if self.people_folder:
|
||||
for person in people:
|
||||
person_path = os.path.join(self.people_folder, person, folder, filename)
|
||||
if not os.path.exists(os.path.dirname(person_path)):
|
||||
os.makedirs(os.path.dirname(person_path))
|
||||
person_path = os.path.join(self.people_folder, person, folder)
|
||||
if not os.path.exists(person_path):
|
||||
os.makedirs(person_path)
|
||||
self._log.debug(f"Copying file '{file}' to '{person_path}'...")
|
||||
shutil.copy(file, person_path)
|
||||
if not self.no_move:
|
||||
|
|
Loading…
Reference in a new issue