From c0c14e1fc353b979fa29e72618469edb4486e0f4 Mon Sep 17 00:00:00 2001 From: Carson McManus Date: Tue, 23 Aug 2016 13:29:49 -0400 Subject: [PATCH] added some verbose logging statements --- Manifest.cs | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/Manifest.cs b/Manifest.cs index a4bf1e1..edd1487 100644 --- a/Manifest.cs +++ b/Manifest.cs @@ -310,6 +310,7 @@ public class Manifest string jsonAccount = JsonConvert.SerializeObject(account); string filename = account.Session.SteamID.ToString() + ".maFile"; + if (Program.Verbose) Console.WriteLine($"Saving account {account.AccountName} to {filename}..."); ManifestEntry newEntry = new ManifestEntry() { @@ -393,16 +394,17 @@ public class Manifest public bool Save() { - - string filename = Program.SteamGuardPath + "manifest.json"; + string filename = Path.Combine(Program.SteamGuardPath, "manifest.json"); if (!Directory.Exists(Program.SteamGuardPath)) { try { + if (Program.Verbose) Console.WriteLine("Creating {0}", Program.SteamGuardPath); Directory.CreateDirectory(Program.SteamGuardPath); } - catch (Exception) + catch (Exception ex) { + if (Program.Verbose) Console.WriteLine($"error: {ex.Message}"); return false; } } @@ -413,8 +415,9 @@ public class Manifest File.WriteAllText(filename, contents); return true; } - catch (Exception) + catch (Exception ex) { + if (Program.Verbose) Console.WriteLine($"error: {ex.Message}"); return false; } }