dfd
Some checks failed
smoke-mm / Install & smoke test mm --help (push) Has been cancelled
Some checks failed
smoke-mm / Install & smoke test mm --help (push) Has been cancelled
This commit is contained in:
@@ -195,7 +195,7 @@ class Folder(Store):
|
||||
try:
|
||||
cursor.execute(
|
||||
"UPDATE files SET file_path = ?, updated_at = CURRENT_TIMESTAMP WHERE hash = ?",
|
||||
(str(hash_path.resolve()), file_hash),
|
||||
(db._to_db_file_path(hash_path), file_hash),
|
||||
)
|
||||
except Exception:
|
||||
pass
|
||||
@@ -237,7 +237,7 @@ class Folder(Store):
|
||||
|
||||
for file_hash, file_path_str in files_without_title:
|
||||
try:
|
||||
file_path = Path(file_path_str)
|
||||
file_path = location_path / str(file_path_str)
|
||||
if file_path.exists():
|
||||
# Use the filename as the title
|
||||
title_tag = f"title:{file_path.name}"
|
||||
@@ -599,7 +599,7 @@ class Folder(Store):
|
||||
for file_hash, file_path_str, size_bytes, ext in rows:
|
||||
if not file_path_str:
|
||||
continue
|
||||
file_path = Path(file_path_str)
|
||||
file_path = search_dir / str(file_path_str)
|
||||
if not file_path.exists():
|
||||
continue
|
||||
if size_bytes is None:
|
||||
@@ -723,7 +723,7 @@ class Folder(Store):
|
||||
for file_hash, file_path_str, size_bytes, ext in rows:
|
||||
if not file_path_str:
|
||||
continue
|
||||
file_path = Path(file_path_str)
|
||||
file_path = search_dir / str(file_path_str)
|
||||
if not file_path.exists():
|
||||
continue
|
||||
if size_bytes is None:
|
||||
@@ -764,7 +764,7 @@ class Folder(Store):
|
||||
for file_hash, file_path_str, size_bytes, ext in rows:
|
||||
if not file_path_str:
|
||||
continue
|
||||
file_path = Path(file_path_str)
|
||||
file_path = search_dir / str(file_path_str)
|
||||
if not file_path.exists():
|
||||
continue
|
||||
if size_bytes is None:
|
||||
@@ -793,7 +793,7 @@ class Folder(Store):
|
||||
for file_hash, file_path_str, size_bytes, ext in rows:
|
||||
if not file_path_str:
|
||||
continue
|
||||
file_path = Path(file_path_str)
|
||||
file_path = search_dir / str(file_path_str)
|
||||
if not file_path.exists():
|
||||
continue
|
||||
if size_bytes is None:
|
||||
@@ -819,7 +819,7 @@ class Folder(Store):
|
||||
for file_hash, file_path_str, size_bytes, ext in rows:
|
||||
if not file_path_str:
|
||||
continue
|
||||
file_path = Path(file_path_str)
|
||||
file_path = search_dir / str(file_path_str)
|
||||
if not file_path.exists():
|
||||
continue
|
||||
if size_bytes is None:
|
||||
@@ -848,7 +848,7 @@ class Folder(Store):
|
||||
for file_hash, file_path_str, size_bytes, ext in rows:
|
||||
if not file_path_str:
|
||||
continue
|
||||
file_path = Path(file_path_str)
|
||||
file_path = search_dir / str(file_path_str)
|
||||
if not file_path.exists():
|
||||
continue
|
||||
if size_bytes is None:
|
||||
@@ -887,7 +887,7 @@ class Folder(Store):
|
||||
if fnmatch(value, pat):
|
||||
if ext_hashes is not None and file_hash not in ext_hashes:
|
||||
break
|
||||
file_path = Path(file_path_str)
|
||||
file_path = search_dir / str(file_path_str)
|
||||
if file_path.exists():
|
||||
if size_bytes is None:
|
||||
size_bytes = file_path.stat().st_size
|
||||
@@ -958,7 +958,7 @@ class Folder(Store):
|
||||
for file_hash, file_path_str, size_bytes, ext in rows:
|
||||
if not file_path_str:
|
||||
continue
|
||||
file_path = Path(file_path_str)
|
||||
file_path = search_dir / str(file_path_str)
|
||||
if not file_path.exists():
|
||||
continue
|
||||
if size_bytes is None:
|
||||
@@ -984,7 +984,7 @@ class Folder(Store):
|
||||
if file_path_str:
|
||||
if ext_hashes is not None and file_hash not in ext_hashes:
|
||||
continue
|
||||
file_path = Path(file_path_str)
|
||||
file_path = search_dir / str(file_path_str)
|
||||
if file_path.exists():
|
||||
if size_bytes is None:
|
||||
size_bytes = file_path.stat().st_size
|
||||
@@ -1629,7 +1629,7 @@ class Folder(Store):
|
||||
if not p:
|
||||
continue
|
||||
try:
|
||||
if not Path(p).exists():
|
||||
if not (Path(self._location) / p).exists():
|
||||
continue
|
||||
except Exception:
|
||||
continue
|
||||
|
||||
Reference in New Issue
Block a user