mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-07-02 02:28:19 +00:00
Merge remote-tracking branch 'origin/main' into fix/devtools-fixex
This commit is contained in:
commit
6fbdaa9ca0
2 changed files with 5 additions and 5 deletions
|
|
@ -107,11 +107,11 @@ namespace PepperDash.Core.WebApi.Presets
|
|||
var user = JsonConvert.DeserializeObject<User>(resp.ContentString);
|
||||
CurrentUser = user;
|
||||
if (handler != null)
|
||||
UserReceived(this, new UserReceivedEventArgs(user, true));
|
||||
handler(this, new UserReceivedEventArgs(user, true));
|
||||
}
|
||||
else
|
||||
if (handler != null)
|
||||
UserReceived(this, new UserReceivedEventArgs(null, false));
|
||||
handler(this, new UserReceivedEventArgs(null, false));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
@ -171,14 +171,14 @@ namespace PepperDash.Core.WebApi.Presets
|
|||
|
||||
J2SMaster.LoadWithJson(preset.Data);
|
||||
if (handler != null)
|
||||
PresetReceived(this, new PresetReceivedEventArgs(preset, true));
|
||||
handler(this, new PresetReceivedEventArgs(preset, true));
|
||||
}
|
||||
else // no existing preset
|
||||
{
|
||||
CurrentPreset = new Preset();
|
||||
LoadDefaultPresetData();
|
||||
if (handler != null)
|
||||
PresetReceived(this, new PresetReceivedEventArgs(null, false));
|
||||
handler(this, new PresetReceivedEventArgs(null, false));
|
||||
}
|
||||
}
|
||||
catch (HttpException e)
|
||||
|
|
|
|||
|
|
@ -150,7 +150,7 @@ namespace PepperDash.Essentials.Core.Config
|
|||
// Directory exists, first clear any contents
|
||||
var archivedConfigFiles = ConfigReader.GetConfigFiles(archiveDirectoryPath + Global.DirectorySeparator + Global.ConfigFileName + ".bak");
|
||||
|
||||
if (archivedConfigFiles != null || archivedConfigFiles.Length > 0)
|
||||
if (archivedConfigFiles != null && archivedConfigFiles.Length > 0)
|
||||
{
|
||||
Debug.LogMessage(LogEventLevel.Information, "{0} Existing files found in archive folder. Deleting.", archivedConfigFiles.Length);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue