Skip to content

Commit

Permalink
Fix derp, #141
Browse files Browse the repository at this point in the history
  • Loading branch information
JustArchi committed Mar 7, 2016
1 parent cfbd880 commit 1a4d941
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions ArchiSteamFarm/Bot.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1169,12 +1169,12 @@ private async void OnLoggedOn(SteamUser.LoggedOnCallback callback) {
}

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

0 comments on commit 1a4d941

Please sign in to comment.