aboutsummaryrefslogtreecommitdiff
path: root/src/lpm.lua
diff options
context:
space:
mode:
authorAdam Harrison <adamdharrison@gmail.com>2023-08-10 10:47:45 -0400
committerAdam Harrison <adamdharrison@gmail.com>2023-08-10 10:47:45 -0400
commit627caff603bb194558bd62425db64b085feff4f8 (patch)
treed70f7ddb2894022d5013a3e9f5abb3971d496c3a /src/lpm.lua
parent201c3bd416cc89e19cb01b179c5e43e53c39fa41 (diff)
downloadlite-xl-plugin-manager-627caff603bb194558bd62425db64b085feff4f8.tar.gz
lite-xl-plugin-manager-627caff603bb194558bd62425db64b085feff4f8.zip
Should fix issue 36.
Diffstat (limited to 'src/lpm.lua')
-rw-r--r--src/lpm.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lpm.lua b/src/lpm.lua
index 22a695c..1a118de 100644
--- a/src/lpm.lua
+++ b/src/lpm.lua
@@ -387,7 +387,7 @@ end
function common.dirname(path) local s = path:reverse():find("[/\\]") if not s then return path end return path:sub(1, #path - s) end
function common.basename(path) local s = path:reverse():find("[/\\]") if not s then return path end return path:sub(#path - s + 2) end
-function common.path(exec) return common.first(common.map({ common.split(":", os.getenv("PATH")) }, function(e) return e .. PATHSEP .. exec end), function(e) local s = system.stat(e) return s and s.type ~= "dir" and s.mode & 73 end) end
+function common.path(exec) return common.first(common.map({ common.split(":", os.getenv("PATH")) }, function(e) return e .. PATHSEP .. exec end), function(e) local s = system.stat(e) return s and s.type ~= "dir" and s.mode and s.mode & 73 end) end
function common.normalize_path(path) if PLATFORM == "windows" and path then path = path:gsub("/", PATHSEP) end if not path or not path:find("^~") then return path end return os.getenv("HOME") .. path:sub(2) end
function common.rmrf(root)
local info = root and root ~= "" and system.stat(root)