aboutsummaryrefslogtreecommitdiff
path: root/src/lpm.lua
diff options
context:
space:
mode:
authorAdam Harrison <adamdharrison@gmail.com>2023-07-03 17:53:23 -0400
committerAdam Harrison <adamdharrison@gmail.com>2023-07-03 17:53:23 -0400
commited800ce62f77a1c14a69173d09b9a75f8601b2dc (patch)
tree3d19f6b5f0d36bf7187afa71ff5cf7a92e9b8bec /src/lpm.lua
parent7b0dbf800bdfe7fe499dd0be293e0929708e9447 (diff)
downloadlite-xl-plugin-manager-ed800ce62f77a1c14a69173d09b9a75f8601b2dc.tar.gz
lite-xl-plugin-manager-ed800ce62f77a1c14a69173d09b9a75f8601b2dc.zip
Fixed issue with non-existent symbolic links not getting removed, and also realpath returning the absolute path of a link target, rather than a link. Also, ensured that the lxl datadir is properly detected.
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 5a4acb7..df5aef7 100644
--- a/src/lpm.lua
+++ b/src/lpm.lua
@@ -2246,7 +2246,7 @@ not commonly used publically.
system_lite_xl = common.first(lite_xls, function(e) return e.version == "system" end)
local directory = common.dirname(lite_xl_binary)
- local lite_xl_datadirs = { DATADIR, directory .. PATHSEP .. "data", directory:find(PATHSEP .. "bin$") and common.dirname(directory .. PATHSEP .. "share" .. PATHSEP .. "lite-xl"), directory .. PATHSEP .. "data" }
+ local lite_xl_datadirs = { DATADIR or "", directory .. PATHSEP .. "data", directory:find(PATHSEP .. "bin$") and common.dirname(directory) .. PATHSEP .. "share" .. PATHSEP .. "lite-xl" or "", directory .. PATHSEP .. "data" }
local lite_xl_datadir = common.first(lite_xl_datadirs, function(p) return p and system.stat(p) end)
if not BINARY and not DATADIR and system_lite_xl then error("can't find existing system lite (does " .. system_lite_xl:get_binary_path() .. " exist? was it moved?); run `lpm purge`, or specify --binary and --datadir.") end