Skip to content

Commit 3ca5354

Browse files
committed
Small output Path fix
1 parent 6a44881 commit 3ca5354

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

image_copier.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ def get_destination_directory(self, image) -> str:
2525
"""
2626
destination = self.output_dir
2727
if self.grouping is not None:
28-
destination += self.grouping.get_group_directory(image)
28+
os.path.join(destination, self.grouping.get_group_directory(image))
2929
return destination
3030

3131
def copy(self, image: ImageFile):
@@ -50,7 +50,7 @@ def __init__(self, output_dir: str, raw_dir_name: str, grouping: Optional[Groupe
5050
def copy(self, image: ImageFile):
5151
destination_dir = self.get_destination_directory(image)
5252
if image.is_raw():
53-
destination_dir = destination_dir + self.raw_dir_name
53+
destination_dir = os.path.join(destination_dir, self.raw_dir_name)
5454
if not os.path.exists(destination_dir):
5555
os.makedirs(destination_dir, exist_ok=True)
5656
shutil.copy2(str(image), destination_dir)

0 commit comments

Comments
 (0)