update screenshot

This commit is contained in:
2026-04-21 10:31:38 -07:00
parent f8230bab9c
commit 10e3cd009b
8 changed files with 1218 additions and 439 deletions
+29
View File
@@ -338,6 +338,14 @@ class Add_File(Cmdlet):
except Exception:
is_storage_backend_location = False
if location and not plugin_name and not is_storage_backend_location:
if not Add_File._looks_like_local_export_target(str(location)):
log(
f"Storage backend '{location}' not found. Use -path for local export or configure that store backend.",
file=sys.stderr,
)
return 1
# Decide which items to process.
# - If directory scan was performed, use those results
# - If user provided -path (and it was not reinterpreted as destination), treat this invocation as single-item.
@@ -1262,6 +1270,27 @@ class Add_File(Cmdlet):
pass
return None
@staticmethod
def _looks_like_local_export_target(location: str) -> bool:
target = str(location or "").strip()
if not target:
return False
target_path = Path(target).expanduser()
try:
if target_path.exists():
return True
except Exception:
pass
if target.startswith((".", "~")):
return True
if "\\" in target or "/" in target:
return True
if len(target) >= 2 and target[1] == ":":
return True
return False
@staticmethod
def _resolve_source(
result: Any,