fix: update patrol delete progress handling

This commit is contained in:
koko
2026-05-02 02:03:49 +08:00
parent 7c2b154c20
commit 1ecce13814
41 changed files with 313 additions and 158 deletions

View File

@@ -27,9 +27,9 @@ def _resolve_asset_filename(filename):
"""Resolve hashed Vite assets without maintaining hardcoded alias tables."""
safe_name = os.path.basename(filename)
asset_dirs = [
ASSETS_DIR,
os.path.abspath(os.path.join(BASE_DIR, 'new_web_source', 'assets')),
os.path.abspath(os.path.join(BASE_DIR, '..', 'new_web_source', 'assets')),
ASSETS_DIR,
]
for asset_dir in asset_dirs:
exact_path = os.path.join(asset_dir, safe_name)
@@ -153,9 +153,9 @@ def serve_assets(filename):
"""提供 static 目录及子目录下的静态文件访问。"""
filename = _resolve_asset_filename(filename)
candidate_dirs = [
os.path.abspath(ASSETS_DIR),
os.path.abspath(os.path.join(BASE_DIR, 'new_web_source', 'assets')),
os.path.abspath(os.path.join(BASE_DIR, '..', 'new_web_source', 'assets')),
os.path.abspath(ASSETS_DIR),
]
for static_abs in candidate_dirs:
filepath = os.path.normpath(os.path.join(static_abs, filename))