File tree Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Expand file tree Collapse file tree 2 files changed +15
-0
lines changed 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 507507
508508function main :LoadSettings (ignoreBuild )
509509 local setXML , errMsg = common .xml .LoadXMLFile (self .userPath .. " Settings.xml" )
510+ if errMsg and not errMsg :match (" .*No such file or directory" ) then
511+ ConPrintf (" Error: '%s'" , errMsg )
512+ launch :ShowErrMsg (" ^1" .. errMsg )
513+ return true
514+ end
510515 if not setXML then
511516 return true
512517 elseif setXML [1 ].elem ~= " PathOfBuilding2" then
645650
646651function main :LoadSharedItems ()
647652 local setXML , errMsg = common .xml .LoadXMLFile (self .userPath .. " Settings.xml" )
653+ if errMsg and not errMsg :match (" .*No such file or directory" ) then
654+ ConPrintf (" Error: '%s'" , errMsg )
655+ launch :ShowErrMsg (" ^1" .. errMsg )
656+ return true
657+ end
648658 if not setXML then
649659 return true
650660 elseif setXML [1 ].elem ~= " PathOfBuilding2" then
You can’t perform that action at this time.
0 commit comments