This commit is contained in:
Tiara Rodney 2025-06-21 23:21:28 +02:00
parent 5c2fb8c32b
commit a4fd97b55a
No known key found for this signature in database
GPG key ID: 5F43FAB4FBE5B5EB

View file

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