fix(upload): remove trailing whitespace

This commit is contained in:
Alexandre Teixeira
2026-06-26 18:01:04 +01:00
parent b3ed60e95a
commit 626414584b
+3 -3
View File
@@ -112,7 +112,7 @@ class UploadHandler:
except Exception: except Exception:
self.file_detector = None self.file_detector = None
logger.warning("python-magic not available, falling back to basic detection") 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 # In-memory index cache to avoid O(N) disk I/O on every request
self._index_cache: Optional[Dict[str, Any]] = None self._index_cache: Optional[Dict[str, Any]] = None
self._index_mtime: float = 0.0 self._index_mtime: float = 0.0
@@ -368,7 +368,7 @@ class UploadHandler:
except Exception as e: except Exception as e:
logger.warning(f"Failed to read uploads database ({candidate}): {e}") logger.warning(f"Failed to read uploads database ({candidate}): {e}")
continue continue
self._index_cache = {} self._index_cache = {}
return {} return {}
@@ -390,7 +390,7 @@ class UploadHandler:
file_hash = info.get("hash") file_hash = info.get("hash")
if file_hash: if file_hash:
return f"{new_owner}:{file_hash}" return f"{new_owner}:{file_hash}"
# Fallback for rows without an explicit hash (should not happen in modern Odysseus) # Fallback for rows without an explicit hash (should not happen in modern Odysseus)
if isinstance(key, str) and ":" in key: if isinstance(key, str) and ":" in key:
# Join all but the last part if there are multiple colons # Join all but the last part if there are multiple colons