From ac666b5344429a0faf2543f56a350a58be4c1503 Mon Sep 17 00:00:00 2001 From: Wires77 Date: Fri, 18 Apr 2025 23:11:08 -0500 Subject: [PATCH] Revert "Fix missing datSource on new installs (#8597)" This reverts commit 0a4c9f7fbac6d6016b1163d987606e8fc075606d. --- src/Export/Classes/GGPKSourceListControl.lua | 2 +- src/Export/Main.lua | 10 ++++------ 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/src/Export/Classes/GGPKSourceListControl.lua b/src/Export/Classes/GGPKSourceListControl.lua index bee46d28..307e5058 100644 --- a/src/Export/Classes/GGPKSourceListControl.lua +++ b/src/Export/Classes/GGPKSourceListControl.lua @@ -43,7 +43,7 @@ function GGPKSourceListClass:EditDATSource(datSource, newSource) controls.save.enabled = (controls.dat.buf:match("%S") or controls.ggpk.buf:match("%S")) and controls.label.buf:match("%S") and buf:match("%S") end) controls.save = new("ButtonControl", {"TOP",controls.spec,"TOP"}, {-45, 22, 80, 20}, "Save", function() - local reload = not main.datSource or (datSource.label == main.datSource.label) + local reload = datSource.label == main.datSource.label datSource.label = controls.label.buf datSource.ggpkPath = controls.ggpk.buf or "" datSource.datFilePath = controls.dat.buf or "" diff --git a/src/Export/Main.lua b/src/Export/Main.lua index 51a95e6e..ec2e0c55 100644 --- a/src/Export/Main.lua +++ b/src/Export/Main.lua @@ -334,12 +334,10 @@ end function main:LoadDatSource(value) self.leagueLabel = nil - if self.datSource then - local out = io.open(self.datSource.spec..(self.datSource.spec:match("%.lua$") and "" or ".lua"), "w") - out:write('return ') - writeLuaTable(out, self.datSpecs, 1) - out:close() - end + local out = io.open(self.datSource.spec..(self.datSource.spec:match("%.lua$") and "" or ".lua"), "w") + out:write('return ') + writeLuaTable(out, self.datSpecs, 1) + out:close() self.datSource = value self.datSpecs = LoadModule(self.datSource.spec) self:InitGGPK()