aboutsummaryrefslogtreecommitdiff
path: root/lpm.c
diff options
context:
space:
mode:
authorAdam <adamdharrison@gmail.com>2022-10-13 17:50:19 -0400
committerAdam <adamdharrison@gmail.com>2022-10-13 17:50:19 -0400
commit805f4373d787e542c7f3d6142ebdeea3a3a63072 (patch)
tree8b2b5c9ed0c2e53b8622dfbe0b89951fdcbf4e7e /lpm.c
parent737dba96f62dba47cc12aa0e15c9802fb567ea89 (diff)
downloadlite-xl-plugin-manager-805f4373d787e542c7f3d6142ebdeea3a3a63072.tar.gz
lite-xl-plugin-manager-805f4373d787e542c7f3d6142ebdeea3a3a63072.zip
Fixed syntax.
Diffstat (limited to 'lpm.c')
-rw-r--r--lpm.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lpm.c b/lpm.c
index 42fdafa..944a98a 100644
--- a/lpm.c
+++ b/lpm.c
@@ -223,12 +223,12 @@ static int lpm_stat(lua_State *L) {
int err = lstat(path, &s);
char *abs_path = realpath(path, NULL);
#endif
- if (err || !res) {
+ if (err || !abs_path) {
lua_pushnil(L);
lua_pushstring(L, strerror(errno));
return 2;
}
- lua_pushstring(L, abs_path) lua_setfield(L, -2, "abs_path");
+ lua_pushstring(L, abs_path); lua_setfield(L, -2, "abs_path");
lua_pushvalue(L, 1); lua_setfield(L, -2, "path");
#if __linux__