kl
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user