fix: update patrol delete progress handling
This commit is contained in:
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user