Skip to content

Commit

Permalink
Path is not within git repository
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexanderDokuchaev committed Mar 2, 2024
1 parent 43a4096 commit e8f4be4
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion md_dead_link_check/link_checker.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,11 @@ def check_path_links(md_data: Dict[str, MarkdownInfo], root_dir: Path, config: C
abs_path = (md_abs_path.parent / split_result.path).resolve()
res_path = abs_path.relative_to(root_dir)
except ValueError:
ret.append(StatusInfo(md_link, "Incorrect path"))
ret.append(StatusInfo(md_link, "Path is not within git repository"))
continue

if abs_path.as_posix() != abs_path.resolve().as_posix():
ret.append(StatusInfo(md_link, "Path is not within git repository"))
continue

if res_path.as_posix() not in md_data:
Expand Down

0 comments on commit e8f4be4

Please sign in to comment.