From f9293a67b0bafab26e558cbe1497244d962bc5fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mart=C3=ADn=20Fern=C3=A1ndez?= Date: Thu, 9 Jul 2020 18:11:56 +0200 Subject: [PATCH] [fix] Remove isAllowedScript leftovers (#6366) Fixes #6365 --- frontend/apps/filemanager/filemanagercollection.lua | 2 +- frontend/document/credocument.lua | 2 +- frontend/util.lua | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/frontend/apps/filemanager/filemanagercollection.lua b/frontend/apps/filemanager/filemanagercollection.lua index 085e13718..850e0a664 100644 --- a/frontend/apps/filemanager/filemanagercollection.lua +++ b/frontend/apps/filemanager/filemanagercollection.lua @@ -94,7 +94,7 @@ function FileManagerCollection:onMenuHold(item) }, } -- NOTE: Duplicated from frontend/apps/filemanager/filemanager.lua - if not Device:isAndroid() and util.isAllowedScript(item.file) then + if Device:canExecuteScript(item.file) then table.insert(buttons, { { -- @translators This is the script's programming language (e.g., shell or python) diff --git a/frontend/document/credocument.lua b/frontend/document/credocument.lua index e9aa4fa97..17b28b84f 100644 --- a/frontend/document/credocument.lua +++ b/frontend/document/credocument.lua @@ -1035,7 +1035,7 @@ function CreDocument:register(registry) registry:addProvider("rtf", "application/rtf", self, 90) registry:addProvider("xhtml", "application/xhtml+xml", self, 90) registry:addProvider("zip", "application/zip", self, 10) - -- Scripts that we allow running in the FM (c.f., util.isAllowedScript) + -- Scripts that we allow running in the FM (c.f., Device:canExecuteScript) registry:addProvider("sh", "application/x-shellscript", self, 90) registry:addProvider("py", "text/x-python", self, 90) end diff --git a/frontend/util.lua b/frontend/util.lua index d89f9a769..f6ba194f6 100644 --- a/frontend/util.lua +++ b/frontend/util.lua @@ -722,7 +722,7 @@ end --- Companion helper function that returns the script's language, --- based on the filme extension. ---- @string filename ----- @treturn string (lowercase) (or nil if !isAllowedScript) +---- @treturn string (lowercase) (or nil if not Device:canExecuteScript(file)) function util.getScriptType(file) local file_ext = string.lower(util.getFileNameSuffix(file)) if file_ext == "sh" then