diff --git a/pydoctor/templatewriter/writer.py b/pydoctor/templatewriter/writer.py index e7377739f..9988aeda8 100644 --- a/pydoctor/templatewriter/writer.py +++ b/pydoctor/templatewriter/writer.py @@ -110,7 +110,8 @@ def writeIndexHardlink(self, system: model.System) -> None: # not using missing_ok=True because that was only added in Python 3.8 and we still support Python 3.6 except FileNotFoundError: pass - shutil.copy(root_module_path, 'index.html') + hardlink_path = (self.build_directory / 'index.html') + shutil.copy(hardlink_path, root_module_path) def _writeDocsFor(self, ob: model.Documentable) -> None: if not ob.isVisible: