Skip to content

Commit

Permalink
fix: child/parent path detection for windows (#72)
Browse files Browse the repository at this point in the history
  • Loading branch information
ThorpeJosh authored Feb 26, 2024
1 parent 60f7156 commit 88dcd2f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion image_sorting_tool/gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,9 @@ def assert_paths_are_valid(self, ignore_output_path=False):
"Output Folder Error", f"Output folder does not exist:\n{dst_path}"
)
return False
if os.path.commonpath([src_path, dst_path]) == src_path:
if os.path.abspath(
os.path.commonpath([src_path, dst_path])
) == os.path.abspath(src_path):
logger.error(
"Output directory cannot be a child of (or same as) input directory"
)
Expand Down

0 comments on commit 88dcd2f

Please sign in to comment.