mirror of
https://github.com/JustArchiNET/ArchiSteamFarm.git
synced 2026-01-01 14:10:53 +00:00
Call base constructor while creating BotDatabase
This is a severe edge case. We forgot to call base constructor during creating BotDatabase, which is funny because it wasn't the case for ASF database. This caused event listeners to not be recorded, and therefore changes not being saved. Normally this bug entirely slipped through because on first login, login key is normally saved into the database, and that part always generated the file, with or without the listeners. However, if somebody has UseLoginKeys: false, and doesn't set up ASF 2FA for the bot, and bot database doesn't exist, it won't get created on changes to other bot database properties, that is: farming blacklist, farming priority queue, match actively blacklist and trading blacklist. Wow, this one is old, I don't know if we didn't have this bug since first version of ASF or something.
This commit is contained in:
@@ -94,7 +94,7 @@ internal sealed class BotDatabase : SerializableFile {
|
||||
[JsonProperty($"_{nameof(MobileAuthenticator)}")]
|
||||
private MobileAuthenticator? BackingMobileAuthenticator;
|
||||
|
||||
private BotDatabase(string filePath) {
|
||||
private BotDatabase(string filePath) : this() {
|
||||
if (string.IsNullOrEmpty(filePath)) {
|
||||
throw new ArgumentNullException(nameof(filePath));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user