Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions runtime/lua/xml.lua
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,16 @@ function xml.LoadXMLFile(fileName)
elseif fileText == "" then
return nil, fileName.." file is empty"
end
<<<<<<<
=======
local fileText = fileHnd:read("*a")
fileHnd:close()
if not fileText then
return nil, fileName.." file returns nil. OneDrive?"
elseif fileText == "" then
return nil, fileName.." file is empty"
end
>>>>>>>
return xml.ParseXML(fileText)
end

Expand Down
17 changes: 17 additions & 0 deletions src/Modules/Main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -513,6 +513,17 @@ end

function main:LoadSettings(ignoreBuild)
local setXML, errMsg = common.xml.LoadXMLFile(self.userPath.."Settings.xml")
<<<<<<<
=======
if errMsg and not errMsg:match(".*No such file or directory") then
ConPrintf("Error: '%s'", errMsg)
launch:ShowErrMsg("^1"..errMsg)
return true
end
if not setXML then
return true
elseif setXML[1].elem ~= "PathOfBuilding2" then
>>>>>>>
if errMsg and not errMsg:match(".*No such file or directory") then
ConPrintf("Error: '%s'", errMsg)
launch:ShowErrMsg("^1"..errMsg)
Expand Down Expand Up @@ -653,6 +664,12 @@ function main:LoadSharedItems()
if errMsg and not errMsg:match(".*No such file or directory") then
ConPrintf("Error: '%s'", errMsg)
launch:ShowErrMsg("^1"..errMsg)
<<<<<<<
=======
return true
end
if not setXML then
>>>>>>>
return true
end
if not setXML then
Expand Down