Self-hosted AI workspace.
Python
fix(upload): remove trailing whitespace
Alexandre Teixeirafb1dfcfd1323
diff --git a/src/upload_handler.py b/src/upload_handler.pyindex 78575588b..1f24c6263 100644--- a/src/upload_handler.py+++ b/src/upload_handler.py@@ -112,7 +112,7 @@ class UploadHandler:except Exception:self.file_detector = Nonelogger.warning("python-magic not available, falling back to basic detection")-+# In-memory index cache to avoid O(N) disk I/O on every requestself._index_cache: Optional[Dict[str, Any]] = Noneself._index_mtime: float = 0.0@@ -368,7 +368,7 @@ class UploadHandler:except Exception as e:logger.warning(f"Failed to read uploads database ({candidate}): {e}")continue-+self._index_cache = {}return {}@@ -390,7 +390,7 @@ class UploadHandler:file_hash = info.get("hash")if file_hash:return f"{new_owner}:{file_hash}"-+# Fallback for rows without an explicit hash (should not happen in modern Odysseus)if isinstance(key, str) and ":" in key:# Join all but the last part if there are multiple colons