Revert "Fix missing datSource on new installs (#8597)"

This reverts commit 0a4c9f7fba.
This commit is contained in:
Wires77
2025-04-18 23:11:08 -05:00
parent 539636bd44
commit ac666b5344
2 changed files with 5 additions and 7 deletions

View File

@@ -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 ""

View File

@@ -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()