fix: silent handling when buffer has no oil adapter (#573)

This commit is contained in:
Steven Arcangeli 2025-03-04 12:56:54 -08:00
parent 975a77cce3
commit d7c61c7084
8 changed files with 23 additions and 31 deletions

View file

@ -530,7 +530,7 @@ M.render_action = function(action)
return string.format("DELETE %s", short_path)
end
elseif action.type == "move" or action.type == "copy" then
local dest_adapter = config.get_adapter_by_scheme(action.dest_url)
local dest_adapter = assert(config.get_adapter_by_scheme(action.dest_url))
if dest_adapter == M then
local _, src_path = util.parse_url(action.src_url)
assert(src_path)
@ -623,7 +623,7 @@ M.perform_action = function(action, cb)
fs.recursive_delete(action.entry_type, path, cb)
end
elseif action.type == "move" then
local dest_adapter = config.get_adapter_by_scheme(action.dest_url)
local dest_adapter = assert(config.get_adapter_by_scheme(action.dest_url))
if dest_adapter == M then
local _, src_path = util.parse_url(action.src_url)
assert(src_path)
@ -641,7 +641,7 @@ M.perform_action = function(action, cb)
cb("files adapter doesn't support cross-adapter move")
end
elseif action.type == "copy" then
local dest_adapter = config.get_adapter_by_scheme(action.dest_url)
local dest_adapter = assert(config.get_adapter_by_scheme(action.dest_url))
if dest_adapter == M then
local _, src_path = util.parse_url(action.src_url)
assert(src_path)