@@ -83,10 +83,10 @@ function main:Init()
8383 -- If running in dev mode or standalone mode, put user data in the script path
8484 self .userPath = GetScriptPath ().. " /"
8585 else
86- local invalidPath
87- self .userPath , invalidPath = GetUserPath ()
86+ local invalidPath , errMsg
87+ self .userPath , invalidPath , errMsg = GetUserPath ()
8888 if not self .userPath then
89- self :OpenPathPopup (invalidPath , ignoreBuild )
89+ self :OpenPathPopup (invalidPath , errMsg , ignoreBuild )
9090 else
9191 self .userPath = self .userPath .. " /Path of Building/"
9292 end
@@ -769,17 +769,23 @@ function main:SaveSettings()
769769 end
770770end
771771
772- function main :OpenPathPopup (invalidPath , ignoreBuild )
772+ function main :OpenPathPopup (invalidPath , errMsg , ignoreBuild )
773773 local controls = { }
774774 local defaultLabelPlacementX = 8
775775
776776 controls .label = new (" LabelControl" , { " TOPLEFT" , nil , " TOPLEFT" }, { defaultLabelPlacementX , 20 , 206 , 16 }, function ()
777- return " ^7User settings path contains unicode characters and cannot be loaded. " ..
777+ return " ^7User settings path cannot be loaded: " .. errMsg ..
778778 " \n Current Path: " .. invalidPath :gsub (" ?" , " ^1?^7" ).. " /Path of Building/" ..
779+ <<<<<<<
779780 " \n Specify a new location for your Settings.xml:"
780781 end )
781782 controls .explainButton = new (" ButtonControl" , { " LEFT" , controls .label , " RIGHT" }, { 4 , 0 , 20 , 20 }, " ?" , function ()
782783 OpenURL (" https://github.com/PathOfBuildingCommunity/PathOfBuilding/wiki/Why-do-I-have-to-change-my-Settings-path%3F" )
784+ =======
785+ " \n If this location is managed by OneDrive, navigate to that folder and manually try" ..
786+ " \n to open Settings.xml in a text editor before re-opening Path of Building" ..
787+ " \n Otherwise, specify a new location for your Settings.xml:"
788+ >>>>>>>
783789 end )
784790 controls .userPath = new (" EditControl" , { " TOPLEFT" , controls .label , " TOPLEFT" }, { 0 , 60 , 206 , 20 }, invalidPath , nil , nil , nil , function (buf )
785791 invalidPath = sanitiseText (buf )
0 commit comments