aboutsummaryrefslogtreecommitdiff
path: root/src/lpm.lua
diff options
context:
space:
mode:
Diffstat (limited to 'src/lpm.lua')
-rw-r--r--src/lpm.lua26
1 files changed, 12 insertions, 14 deletions
diff --git a/src/lpm.lua b/src/lpm.lua
index f17fcb8..901c02e 100644
--- a/src/lpm.lua
+++ b/src/lpm.lua
@@ -1603,20 +1603,18 @@ function Bottle:all_addons()
end
end
end
- -- If we can't find the datadir, assume that we have the core plugins installed.
- if not system.stat(self.lite_xl.datadir_path) then
- for id, v in pairs(CORE_PLUGINS) do
- if not hash[id] then
- table.insert(t, Addon.new(nil, {
- id = id,
- type = "plugin",
- location = "core",
- organization = "singleton",
- local_path = nil,
- mod_version = self.lite_xl.mod_version,
- path = "plugins" .. PATHSEP .. id .. ".lua"
- }))
- end
+ -- Ensure we have at least one instance of each core plugin.
+ for id, v in pairs(CORE_PLUGINS) do
+ if not hash[id] then
+ table.insert(t, Addon.new(nil, {
+ id = id,
+ type = "plugin",
+ location = "core",
+ organization = "singleton",
+ local_path = nil,
+ mod_version = self.lite_xl.mod_version,
+ path = "plugins" .. PATHSEP .. id .. ".lua"
+ }))
end
end
self.all_addons_cache = t