@@ -77,10 +77,10 @@ function main:Init()
7777 -- If running in dev mode or standalone mode, put user data in the script path
7878 self .userPath = GetScriptPath ().. " /"
7979 else
80- local invalidPath
81- self .userPath , invalidPath = GetUserPath ()
80+ local invalidPath , errMsg
81+ self .userPath , invalidPath , errMsg = GetUserPath ()
8282 if not self .userPath then
83- self :OpenPathPopup (invalidPath , ignoreBuild )
83+ self :OpenPathPopup (invalidPath , errMsg , ignoreBuild )
8484 else
8585 self .userPath = self .userPath .. " /Path of Building (PoE2)/"
8686 end
@@ -770,17 +770,16 @@ function main:SaveSettings()
770770 end
771771end
772772
773- function main :OpenPathPopup (invalidPath , ignoreBuild )
773+ function main :OpenPathPopup (invalidPath , errMsg , ignoreBuild )
774774 local controls = { }
775775 local defaultLabelPlacementX = 8
776776
777777 controls .label = new (" LabelControl" , { " TOPLEFT" , nil , " TOPLEFT" }, { defaultLabelPlacementX , 20 , 206 , 16 }, function ()
778- return " ^7User settings path contains unicode characters and cannot be loaded. " ..
778+ return " ^7User settings path cannot be loaded: " .. errMsg ..
779779 " \n Current Path: " .. invalidPath :gsub (" ?" , " ^1?^7" ).. " /Path of Building/" ..
780- " \n Specify a new location for your Settings.xml:"
781- end )
782- controls .explainButton = new (" ButtonControl" , { " LEFT" , controls .label , " RIGHT" }, { 4 , 0 , 20 , 20 }, " ?" , function ()
783- OpenURL (" https://github.com/PathOfBuildingCommunity/PathOfBuilding-PoE2/wiki/Why-do-I-have-to-change-my-Settings-path%3F" )
780+ " \n If this location is managed by OneDrive, navigate to that folder and manually try" ..
781+ " \n to open Settings.xml in a text editor before re-opening Path of Building" ..
782+ " \n Otherwise, specify a new location for your Settings.xml:"
784783 end )
785784 controls .userPath = new (" EditControl" , { " TOPLEFT" , controls .label , " TOPLEFT" }, { 0 , 60 , 206 , 20 }, invalidPath , nil , nil , nil , function (buf )
786785 invalidPath = sanitiseText (buf )
0 commit comments