File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -101,6 +101,11 @@ function xml.LoadXMLFile(fileName)
101101 end
102102 local fileText = fileHnd :read (" *a" )
103103 fileHnd :close ()
104+ if not fileText then
105+ return nil , fileName .. " file returns nil. OneDrive?"
106+ elseif fileText == " " then
107+ return nil , fileName .. " file is empty"
108+ end
104109 return xml .ParseXML (fileText )
105110end
106111
Original file line number Diff line number Diff line change 506506
507507function main :LoadSettings (ignoreBuild )
508508 local setXML , errMsg = common .xml .LoadXMLFile (self .userPath .. " Settings.xml" )
509+ if errMsg and not errMsg :match (" .*No such file or directory" ) then
510+ ConPrintf (" Error: '%s'" , errMsg )
511+ launch :ShowErrMsg (" ^1" .. errMsg )
512+ return true
513+ end
509514 if not setXML then
510515 return true
511516 elseif setXML [1 ].elem ~= " PathOfBuilding2" then
640645
641646function main :LoadSharedItems ()
642647 local setXML , errMsg = common .xml .LoadXMLFile (self .userPath .. " Settings.xml" )
648+ if errMsg and not errMsg :match (" .*No such file or directory" ) then
649+ ConPrintf (" Error: '%s'" , errMsg )
650+ launch :ShowErrMsg (" ^1" .. errMsg )
651+ return true
652+ end
643653 if not setXML then
644654 return true
645655 elseif setXML [1 ].elem ~= " PathOfBuilding2" then
You can’t perform that action at this time.
0 commit comments