f
This commit is contained in:
@@ -223,30 +223,11 @@ class Add_File(Cmdlet):
|
||||
try:
|
||||
candidate_dir = Path(str(path_arg))
|
||||
if candidate_dir.exists() and candidate_dir.is_dir():
|
||||
piped_items = result if isinstance(result, list) else [result]
|
||||
has_local_source = False
|
||||
for it in piped_items:
|
||||
try:
|
||||
po = coerce_to_pipe_object(it, None)
|
||||
src = str(getattr(po, "path", "") or "").strip()
|
||||
if not src:
|
||||
continue
|
||||
if src.lower().startswith(("http://",
|
||||
"https://",
|
||||
"magnet:",
|
||||
"torrent:")):
|
||||
continue
|
||||
if Path(src).is_file():
|
||||
has_local_source = True
|
||||
break
|
||||
except Exception:
|
||||
continue
|
||||
if has_local_source:
|
||||
debug(
|
||||
f"[add-file] Treating -path directory as destination: {candidate_dir}"
|
||||
)
|
||||
location = str(candidate_dir)
|
||||
path_arg = None
|
||||
debug(
|
||||
f"[add-file] Treating -path directory as destination: {candidate_dir}"
|
||||
)
|
||||
location = str(candidate_dir)
|
||||
path_arg = None
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
@@ -693,8 +674,8 @@ class Add_File(Cmdlet):
|
||||
# Legacy search-file refresh is no longer used for final display.
|
||||
if want_final_search_file and collected_payloads:
|
||||
try:
|
||||
from SYS.result_table import Table
|
||||
from SYS.rich_display import render_item_details_panel
|
||||
from SYS.result_table import Table
|
||||
|
||||
# Stop the live pipeline progress UI before rendering the details panels.
|
||||
# This prevents the progress display from lingering on screen.
|
||||
@@ -736,6 +717,11 @@ class Add_File(Cmdlet):
|
||||
collected_payloads,
|
||||
subject=subject
|
||||
)
|
||||
|
||||
try:
|
||||
ctx.set_last_result_items_only(list(collected_payloads))
|
||||
except Exception:
|
||||
pass
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
|
||||
Reference in New Issue
Block a user