added some verbose logging statements

This commit is contained in:
Carson McManus 2016-08-23 13:29:49 -04:00
parent f31e38d0aa
commit c0c14e1fc3

View file

@ -310,6 +310,7 @@ public class Manifest
string jsonAccount = JsonConvert.SerializeObject(account); string jsonAccount = JsonConvert.SerializeObject(account);
string filename = account.Session.SteamID.ToString() + ".maFile"; string filename = account.Session.SteamID.ToString() + ".maFile";
if (Program.Verbose) Console.WriteLine($"Saving account {account.AccountName} to {filename}...");
ManifestEntry newEntry = new ManifestEntry() ManifestEntry newEntry = new ManifestEntry()
{ {
@ -393,16 +394,17 @@ public class Manifest
public bool Save() public bool Save()
{ {
string filename = Path.Combine(Program.SteamGuardPath, "manifest.json");
string filename = Program.SteamGuardPath + "manifest.json";
if (!Directory.Exists(Program.SteamGuardPath)) if (!Directory.Exists(Program.SteamGuardPath))
{ {
try try
{ {
if (Program.Verbose) Console.WriteLine("Creating {0}", Program.SteamGuardPath);
Directory.CreateDirectory(Program.SteamGuardPath); Directory.CreateDirectory(Program.SteamGuardPath);
} }
catch (Exception) catch (Exception ex)
{ {
if (Program.Verbose) Console.WriteLine($"error: {ex.Message}");
return false; return false;
} }
} }
@ -413,8 +415,9 @@ public class Manifest
File.WriteAllText(filename, contents); File.WriteAllText(filename, contents);
return true; return true;
} }
catch (Exception) catch (Exception ex)
{ {
if (Program.Verbose) Console.WriteLine($"error: {ex.Message}");
return false; return false;
} }
} }