Revert "Fix missing datSource on new installs (#8597)"
This reverts commit 0a4c9f7fba.
This commit is contained in:
@@ -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 ""
|
||||
|
||||
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user