aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam <adamdharrison@gmail.com>2022-10-04 21:18:26 -0400
committerAdam <adamdharrison@gmail.com>2022-10-04 21:18:26 -0400
commit5c3cb31f0fdbf406bc1dbbf830ffb4d9822cf18e (patch)
tree4964414ebc7e73550fbeae58ee3ab3b416225686
parent398e1799e8fbcaae11d2ff9a084a94cbb26a4ff6 (diff)
downloadlite-xl-plugin-manager-5c3cb31f0fdbf406bc1dbbf830ffb4d9822cf18e.tar.gz
lite-xl-plugin-manager-5c3cb31f0fdbf406bc1dbbf830ffb4d9822cf18e.zip
Port lite-xl changes.
-rw-r--r--lpm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lpm.c b/lpm.c
index 6c6d55b..d8e0376 100644
--- a/lpm.c
+++ b/lpm.c
@@ -131,7 +131,7 @@ static int lpm_ls(lua_State *L) {
#ifdef _WIN32
lua_settop(L, 1);
- if (strchr("\\/", path[strlen(path) - 2]) != NULL)
+ if (path[0] == 0 || strchr("\\/", path[strlen(path) - 1]) != NULL)
lua_pushstring(L, "*");
else
lua_pushstring(L, "/*");