mirror of
https://github.com/JustArchiNET/ArchiSteamFarm.git
synced 2026-01-01 14:10:53 +00:00
Fix broken bot databases
This commit is contained in:
@@ -133,7 +133,7 @@ namespace ArchiSteamFarm {
|
||||
|
||||
BotConfig = BotConfig.Load(botPath + ".json");
|
||||
if (BotConfig == null) {
|
||||
Logging.LogGenericError("Your config for this bot instance is invalid, it won't run!", botName);
|
||||
Logging.LogGenericError("Your bot config is invalid, refusing to start this bot instance!", botName);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -162,6 +162,12 @@ namespace ArchiSteamFarm {
|
||||
return;
|
||||
}
|
||||
|
||||
BotDatabase = BotDatabase.Load(botPath + ".db");
|
||||
if (BotDatabase == null) {
|
||||
Logging.LogGenericError("Bot database could not be loaded, refusing to start this bot instance!", botName);
|
||||
return;
|
||||
}
|
||||
|
||||
bool alreadyExists;
|
||||
lock (Bots) {
|
||||
alreadyExists = Bots.ContainsKey(botName);
|
||||
@@ -174,7 +180,6 @@ namespace ArchiSteamFarm {
|
||||
return;
|
||||
}
|
||||
|
||||
BotDatabase = BotDatabase.Load(botPath + ".db");
|
||||
SentryFile = botPath + ".bin";
|
||||
|
||||
if (BotDatabase.SteamGuardAccount == null) {
|
||||
|
||||
@@ -78,6 +78,10 @@ namespace ArchiSteamFarm {
|
||||
return null;
|
||||
}
|
||||
|
||||
if (botDatabase == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
botDatabase.FilePath = filePath;
|
||||
return botDatabase;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user