We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 552b03c commit fac2095Copy full SHA for fac2095
1 file changed
llcom/View/MainWindow.xaml.cs
@@ -858,7 +858,16 @@ private void loadLuaFile(string fileName)
858
}
859
860
//文件内容显示出来
861
- textEditor.Text = File.ReadAllText(Tools.Global.ProfilePath + $"user_script_run/{Tools.Global.setting.runScript}.lua");
+ try
862
+ {
863
+ textEditor.Text = File.ReadAllText(Tools.Global.ProfilePath + $"user_script_run/{Tools.Global.setting.runScript}.lua");
864
+ }
865
+ catch
866
867
+ MessageBox.Show("File load failed.\r\n" +
868
+ "Do not open this file in other application!");
869
+ return;
870
871
872
//记录最后时间
873
lastLuaFileTime = File.GetLastWriteTime(Tools.Global.ProfilePath + $"user_script_run/{Tools.Global.setting.runScript}.lua");
0 commit comments