From a4fd97b55a2bff04b162e2f00dba148b0303f833 Mon Sep 17 00:00:00 2001 From: Tiara Rodney Date: Sat, 21 Jun 2025 23:21:28 +0200 Subject: [PATCH] dirty --- .../sphinxcontrib/ext/html_static_archive/__init__.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/byteb4rb1e/sphinxcontrib/ext/html_static_archive/__init__.py b/src/byteb4rb1e/sphinxcontrib/ext/html_static_archive/__init__.py index b722588..3c4eb85 100644 --- a/src/byteb4rb1e/sphinxcontrib/ext/html_static_archive/__init__.py +++ b/src/byteb4rb1e/sphinxcontrib/ext/html_static_archive/__init__.py @@ -48,6 +48,8 @@ def on_env_updated( ): """ """ + static_dir = Path(app.outdir) / '_static' + for url, fh in _static_archives.items(): modes = { 'application/x-tar': 'r', @@ -67,12 +69,11 @@ def on_env_updated( if file.isdir(): continue - shadow_file = Path(app.outdir) / '_static' / file.name + shadow_file = static_dir / file.name if not shadow_file.exists(): logger.info(f'html_static_archive (extract): {url}::{file.name}') - shadow_file.parent.mkdir(parents=True) - archive.extract(file, path=shadow_file) + archive.extract(file, path=static_dir, filter='data') archive.close() fh.close()