diff options
author | Adam Harrison <adamdharrison@gmail.com> | 2024-05-13 17:15:30 -0400 |
---|---|---|
committer | Adam Harrison <adamdharrison@gmail.com> | 2024-05-13 17:15:30 -0400 |
commit | 27db72a1252adb72144e9f733eb71d76d70ae541 (patch) | |
tree | 7f2d92e0d2af22816f64fa98264b495c4e04f520 /src | |
parent | e38c3277caa710da677751290703ff6ed5763765 (diff) | |
download | lite-xl-plugin-manager-27db72a1252adb72144e9f733eb71d76d70ae541.tar.gz lite-xl-plugin-manager-27db72a1252adb72144e9f733eb71d76d70ae541.zip |
Fixed issue with https://github.com/lite-xl/lite-xl-plugin-manager/issues/110.
Diffstat (limited to 'src')
-rw-r--r-- | src/lpm.lua | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/lpm.lua b/src/lpm.lua index 2e3772b..1749588 100644 --- a/src/lpm.lua +++ b/src/lpm.lua @@ -720,7 +720,7 @@ function Addon.new(repository, metadata) local plural_type = type == "library" and "libraries" or (type .. "s") if not self.path and repository and repository.local_path and system.stat(repository.local_path .. PATHSEP .. plural_type .. PATHSEP .. self.id .. ".lua") then self.path = plural_type .. PATHSEP .. self.id .. ".lua" end if not self.path and repository and repository.local_path and system.stat(repository.local_path .. PATHSEP .. plural_type .. PATHSEP .. self.id) then self.path = plural_type .. PATHSEP .. self.id end - self.organization = metadata.organization or (((self.files and #self.files > 0) or (not self.path and not self.url) or (self.path and not self.path:find("%.lua$"))) and "complex" or "singleton") + if self.dependencies and #self.dependencies > 0 then local t = {} for i,v in ipairs(self.dependencies) do t[v] = {} end @@ -735,6 +735,7 @@ function Addon.new(repository, metadata) self.local_path = (repository.local_path .. (self.path and (PATHSEP .. self.path:gsub("^/", ""):gsub("%.$", "")) or "")) or nil end end + self.organization = metadata.organization or (((self.files and #self.files > 0) or (not self.path and not self.url) or not (self.local_path and (system.stat(self.local_path) or {}).type == "file")) and "complex" or "singleton") return self end |