This commit is contained in:
2026-01-15 16:26:22 -08:00
parent dabc8f9d51
commit cb679235bd
7 changed files with 125 additions and 54 deletions

View File

@@ -239,7 +239,9 @@ class search_file(Cmdlet):
pass
db = None
if library_root:
# Disable Folder DB usage for "external" searches when not using a folder store
# db = None
if library_root and False: # Disabled to prevent 'database is locked' errors during external searches
try:
from API.folder import API_folder_store
@@ -936,7 +938,17 @@ class search_file(Cmdlet):
pass
if refresh_mode:
ctx.set_last_result_table_preserve_history(table, results_list)
# For internal refresh, use overlay mode to avoid adding to history
try:
# Parse out the store/hash context if possible
subject_context = None
if "hash:" in query:
subject_hash = query.split("hash:")[1].split(",")[0].strip()
subject_context = {"store": backend_to_search, "hash": subject_hash}
ctx.set_last_result_table_overlay(table, results_list, subject=subject_context)
except Exception:
ctx.set_last_result_table_preserve_history(table, results_list)
else:
ctx.set_last_result_table(table, results_list)
db.append_worker_stdout(