chore: clear file-based safe mode in PluginManager

This commit is contained in:
goat 2022-07-24 11:46:58 +02:00
parent ed122d3931
commit aa1819edef
No known key found for this signature in database
GPG key ID: 49E2AA8C6A76498B

View file

@ -73,7 +73,13 @@ internal partial class PluginManager : IDisposable, IServiceType
try try
{ {
var appdata = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData); var appdata = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData);
this.SafeMode = this.SafeMode || File.Exists(Path.Combine(appdata, "XIVLauncher", ".dalamud_safemode")); var safeModeFile = Path.Combine(appdata, "XIVLauncher", ".dalamud_safemode");
if (File.Exists(safeModeFile))
{
this.SafeMode = true;
File.Delete(safeModeFile);
}
} }
catch (Exception ex) catch (Exception ex)
{ {