mirror of
https://github.com/JustArchiNET/ArchiSteamFarm.git
synced 2026-01-16 08:25:28 +00:00
Avoid attempting to save database without a FilePath
This commit is contained in:
@@ -198,7 +198,13 @@ namespace ArchiSteamFarm {
|
||||
Utilities.InBackground(Save);
|
||||
}
|
||||
|
||||
private async void OnObjectModified(object? sender, EventArgs e) => await Save().ConfigureAwait(false);
|
||||
private async void OnObjectModified(object? sender, EventArgs e) {
|
||||
if (string.IsNullOrEmpty(FilePath)) {
|
||||
return;
|
||||
}
|
||||
|
||||
await Save().ConfigureAwait(false);
|
||||
}
|
||||
|
||||
// ReSharper disable UnusedMember.Global
|
||||
public bool ShouldSerializeBackingLoginKey() => !string.IsNullOrEmpty(BackingLoginKey);
|
||||
|
||||
@@ -221,7 +221,13 @@ namespace ArchiSteamFarm {
|
||||
}
|
||||
}
|
||||
|
||||
private async void OnObjectModified(object? sender, EventArgs e) => await Save().ConfigureAwait(false);
|
||||
private async void OnObjectModified(object? sender, EventArgs e) {
|
||||
if (string.IsNullOrEmpty(FilePath)) {
|
||||
return;
|
||||
}
|
||||
|
||||
await Save().ConfigureAwait(false);
|
||||
}
|
||||
|
||||
// ReSharper disable UnusedMember.Global
|
||||
public bool ShouldSerializeBackingCellID() => BackingCellID != 0;
|
||||
|
||||
Reference in New Issue
Block a user