Skip to content

Commit

Permalink
fix first load script error in color config
Browse files Browse the repository at this point in the history
causes empty color config and completely broken ui and scripts
  • Loading branch information
poco0317 committed Oct 22, 2021
1 parent 9205543 commit 4012cf0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Themes/Rebirth/Scripts/01 color_config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,7 @@ function COLORS.loadColorConfigPresets(self)
-- put the default in
if not FILEMAN:DoesFileExist(defaultpresetpath) then
writeDefaultPreset()
FILEMAN:FlushDirCache(presetfolder)
end

-- check the preset folder for more presets
Expand All @@ -294,14 +295,14 @@ function COLORS.loadColorConfigPresets(self)
end
end

self.presets = {}
if #confignames == 0 then
print("No color config presets present even after writing the default one!!!")
return
end

local count = 0
-- load all the presets
self.presets = {}
for _, name in ipairs(confignames) do
count = count + 1
local pname = presetfolder .. name .. ".lua"
Expand Down

0 comments on commit 4012cf0

Please sign in to comment.