From 5c910d053e6c991e7084d23e5867e08ecff7fb4b Mon Sep 17 00:00:00 2001 From: 0xb10c Date: Sun, 12 Apr 2026 22:16:02 +0200 Subject: [PATCH] change: don't preserve permissions duing static copy By default this would use copy2, and copy preserves file metadata (modification times, permissions), while `copy` only copies the content and basic permissions. We don't need to preserve the static permissions. --- mirror/html/renderer.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mirror/html/renderer.py b/mirror/html/renderer.py index d326903..8f2c7ea 100644 --- a/mirror/html/renderer.py +++ b/mirror/html/renderer.py @@ -63,13 +63,13 @@ def _copy_static(self) -> None: if src.is_dir(): if dst.exists(): shutil.rmtree(dst) - shutil.copytree(src, dst) + shutil.copytree(src, dst, copy_function=shutil.copy) # Copy root-level static files for name in ("site.webmanifest", "browserconfig.xml"): src = static_src / name if src.is_file(): - shutil.copy2(src, out / name) + shutil.copy(src, out / name) def _render_home(self) -> None: print("Rendering home page...")