Skip to content

Commit

Permalink
fix: resolve path before checking existance
Browse files Browse the repository at this point in the history
  • Loading branch information
JonasDoesThings committed May 24, 2023
1 parent 1906eb8 commit faac66d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mkdocs_exclude_unused_files/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ def on_post_page(self, output: str, page: Page, config: MkDocsConfig) -> Optiona
for tag, attr in html_tags.items():
for file in soup.find_all(tag, {attr: True}):
path_check = path.join(path.dirname(page.file.abs_dest_path), unquote(file[attr]))
if path.exists(path_check):
if path.exists(Path(path_check).resolve()):
discarded_path = str(Path(path_check).resolve())
log.debug("discarded path: %s", discarded_path)
self.asset_files.discard(discarded_path)
Expand Down

0 comments on commit faac66d

Please sign in to comment.