Skip to content

Commit

Permalink
Test, improve duplicate file log. #20
Browse files Browse the repository at this point in the history
  • Loading branch information
ewels committed Aug 1, 2022
1 parent dfa1f78 commit 8f3f93f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/rich_codex/codex_search.py
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,9 @@ def check_duplicate_paths(self):
img_paths_src[img_path] = [ri.source]
for img_path, src in img_paths_src.items():
if len(src) > 1:
log.warning(f"Duplicate output file path: '{img_path}' found in '{', '.join(src)}'")
img_path_rel = Path(img_path).relative_to(Path.cwd())
src_paths = "', '".join(set(str(s.relative_to(Path.cwd())) for s in src))
log.warning(f"Duplicate output file path '{img_path_rel}' found in '{src_paths}'")

def save_all_images(self):
"""Save the images that we have collected."""
Expand Down

0 comments on commit 8f3f93f

Please sign in to comment.