From 626414584b1efd16b872ec83ff10f5ed872f21ac Mon Sep 17 00:00:00 2001 From: Alexandre Teixeira Date: Fri, 26 Jun 2026 18:01:04 +0100 Subject: [PATCH] fix(upload): remove trailing whitespace --- src/upload_handler.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/upload_handler.py b/src/upload_handler.py index 78575588b..1f24c6263 100644 --- a/src/upload_handler.py +++ b/src/upload_handler.py @@ -112,7 +112,7 @@ class UploadHandler: except Exception: self.file_detector = None logger.warning("python-magic not available, falling back to basic detection") - + # In-memory index cache to avoid O(N) disk I/O on every request self._index_cache: Optional[Dict[str, Any]] = None self._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