mirror of
https://github.com/volatilityfoundation/volatility3.git
synced 2026-09-07 10:17:38 +02:00
Only remove a file URL with no host and a non-existant path
This commit is contained in:
@@ -313,7 +313,12 @@ class SqliteCache(CacheManagerInterface):
|
||||
# Missing entries
|
||||
if missing_locations:
|
||||
for missing_location in missing_locations:
|
||||
if not os.path.exists(missing_location):
|
||||
parsed_url = urllib.parse(missing_location)
|
||||
if (
|
||||
parsed_url.scheme == "file"
|
||||
and parsed_url.host == ""
|
||||
and not os.path.exists(parsed_url.path)
|
||||
):
|
||||
self._database.cursor().execute(
|
||||
f"DELETE FROM cache WHERE location IN ({','.join(['?'] * len(missing_locations))})",
|
||||
[x for x in missing_locations],
|
||||
|
||||
Reference in New Issue
Block a user