Refactor: fix socket leak, deduplicate stat/path logic, simplify config
- get_local_ip: use context manager to prevent socket leak - _route_files: single stat() per file instead of two - _safe_path helper: DRY path resolution for download/delete - load_config: loop over vars(args) instead of 6 repetitive blocks - Remove stale comment from index.html Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -259,8 +259,6 @@ $('lang-sw').addEventListener('click', e => {
|
||||
if (e.target.dataset.l) setLang(e.target.dataset.l);
|
||||
});
|
||||
|
||||
/* File type is determined server-side via /files API ("text" | "image" | "other") */
|
||||
|
||||
/* ── Helpers ── */
|
||||
|
||||
let toastTimer;
|
||||
|
||||
Reference in New Issue
Block a user