mirror of
https://github.com/Ascyii/gpg.yazi.git
synced 2026-01-01 02:44:24 -05:00
Fix with string
This commit is contained in:
4
main.lua
4
main.lua
@@ -24,7 +24,7 @@ return {
|
|||||||
end,
|
end,
|
||||||
entry = function()
|
entry = function()
|
||||||
local delete_after, default_recipient = get_state_attr("delete_after"), get_state_attr("default_recipient")
|
local delete_after, default_recipient = get_state_attr("delete_after"), get_state_attr("default_recipient")
|
||||||
local hovered = hovered_url()
|
local hovered = tostring(hovered_url())
|
||||||
if not hovered then
|
if not hovered then
|
||||||
return info("No file selected")
|
return info("No file selected")
|
||||||
end
|
end
|
||||||
@@ -33,7 +33,7 @@ return {
|
|||||||
return info("No recipient set")
|
return info("No recipient set")
|
||||||
end
|
end
|
||||||
|
|
||||||
local _, err = Command("gpg"):arg("--yes"):arg("--recipient"):arg(default_recipient):arg("--output"):arg(tostring(hovered) .. ".gpg"):arg("--encrypt"):arg(tostring(hovered)):output()
|
local _, err = Command("gpg"):arg("--yes"):arg("--recipient"):arg(default_recipient):arg("--output"):arg(hovered .. ".gpg"):arg("--encrypt"):arg(hovered):output()
|
||||||
if err then
|
if err then
|
||||||
return info("Failed to gpg with error: " .. err)
|
return info("Failed to gpg with error: " .. err)
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user