mirror of
https://github.com/pewdiepie-archdaemon/odysseus.git
synced 2026-06-30 16:42:15 -04:00
fix(upload): remove trailing whitespace
This commit is contained in:
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user