Skip to content

Commit 1a4d941

Browse files
committed
Fix derp, #141
1 parent cfbd880 commit 1a4d941

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

ArchiSteamFarm/Bot.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1169,12 +1169,12 @@ private async void OnLoggedOn(SteamUser.LoggedOnCallback callback) {
11691169
}
11701170

11711171
// Support and convert SDA files
1172-
ulong steamID = callback.ClientSteamID;
1173-
if (BotDatabase.SteamGuardAccount == null && File.Exists(steamID + ".maFile")) {
1172+
string maFilePath = Path.Combine(Program.ConfigDirectory, callback.ClientSteamID.ConvertToUInt64() + ".maFile");
1173+
if (BotDatabase.SteamGuardAccount == null && File.Exists(maFilePath)) {
11741174
Logging.LogGenericInfo("Converting SDA .maFile into ASF format...", BotName);
11751175
try {
1176-
BotDatabase.SteamGuardAccount = JsonConvert.DeserializeObject<SteamGuardAccount>(File.ReadAllText(steamID + ".maFile"));
1177-
File.Delete(steamID + ".maFile");
1176+
BotDatabase.SteamGuardAccount = JsonConvert.DeserializeObject<SteamGuardAccount>(File.ReadAllText(maFilePath));
1177+
File.Delete(maFilePath);
11781178
Logging.LogGenericInfo("Success!", BotName);
11791179
} catch (Exception e) {
11801180
Logging.LogGenericException(e, BotName);

0 commit comments

Comments
 (0)