diff --git a/Manifest.cs b/Manifest.cs index c71a01f..4f94bc2 100644 --- a/Manifest.cs +++ b/Manifest.cs @@ -63,8 +63,21 @@ public class Manifest if (!File.Exists(maFile)) { if (Program.Verbose) Console.WriteLine("warn: No manifest file found at {0}", maFile); - _manifest = _generateNewManifest(true); - return _manifest; + bool? createNewManifest = Program.SteamGuardPath == + Program.defaultSteamGuardPath.Replace("~", Environment.GetEnvironmentVariable("HOME")) ? true : (bool?) null; + while (createNewManifest == null) + { + Console.Write($"Generate new manifest.json in {Program.SteamGuardPath}? [Y/n]"); + var answer = Console.ReadLine(); + if (answer != null) + createNewManifest = !answer.StartsWith("n") && !answer.StartsWith("N"); + } + if ((bool) createNewManifest) + { + _manifest = _generateNewManifest(true); + return _manifest; + } + return null; } try diff --git a/Program.cs b/Program.cs index 8cecf44..381c7b9 100644 --- a/Program.cs +++ b/Program.cs @@ -11,7 +11,7 @@ using System.Threading.Tasks; public static class Program { - const string defaultSteamGuardPath = "~/maFiles"; + public const string defaultSteamGuardPath = "~/maFiles"; public static string SteamGuardPath { get; set; } = defaultSteamGuardPath; public static Manifest Manifest { get; set; }