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()