This commit is contained in:
2026-03-31 23:30:57 -07:00
parent 6ef5b645a8
commit 57b595c1a4
7 changed files with 381 additions and 111 deletions

View File

@@ -326,10 +326,8 @@ class Add_File(Cmdlet):
is_storage_backend_location = False
if location:
try:
# Check against the cached startup list of available backends
from cmdlet._shared import SharedArgs
available_backends = SharedArgs.get_store_choices(config)
is_storage_backend_location = location in available_backends
store_for_lookup = storage_registry or Store(config)
is_storage_backend_location = Add_File._resolve_backend_by_name(store_for_lookup, str(location)) is not None
except Exception:
is_storage_backend_location = False
@@ -608,8 +606,8 @@ class Add_File(Cmdlet):
if location:
try:
store = storage_registry or Store(config)
backends = store.list_backends()
if location in backends:
resolved_backend = Add_File._resolve_backend_by_name(store, str(location))
if resolved_backend is not None:
code = self._handle_storage_backend(
item,
media_path,