From 75cc5563c7dc02365b8c83f30a09ee1aff77263f Mon Sep 17 00:00:00 2001 From: Stavros Korokithakis Date: Sat, 20 Nov 2021 17:54:59 +0200 Subject: [PATCH] Fix the replacement path --- move_html_to_dir | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/move_html_to_dir b/move_html_to_dir index e4bce0a..9fefa47 100755 --- a/move_html_to_dir +++ b/move_html_to_dir @@ -43,7 +43,7 @@ def main(path: Path): new_path = dir_path / "index.html" p.rename(new_path) - replacements[str(p.relative_to(path))] = str(new_path.relative_to(path)) + replacements[str(p.relative_to(path))] = f"{new_path.parent.relative_to(path)}/" replace_links(path, replacements)