From d860b6f6eb6d8e96ba19b0be8cf8184af3e1d06d Mon Sep 17 00:00:00 2001 From: Carson McManus Date: Sun, 21 Aug 2016 13:03:43 -0400 Subject: [PATCH] Added static SteamGuardPath property --- Program.cs | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/Program.cs b/Program.cs index d190d2d..d6e1ec1 100644 --- a/Program.cs +++ b/Program.cs @@ -1,9 +1,14 @@ using System; using System.Text; using System.Linq; +using System.IO; public static class Program { + const string defaultSteamGuardPath = "~/maFiles"; + + public static string SteamGuardPath { get; set; } = defaultSteamGuardPath; + /// /// The main entry point for the application /// @@ -15,6 +20,22 @@ public static class Program Console.WriteLine("steamguard-cli - v0.0"); Console.WriteLine(); Console.WriteLine("--help, -h Display this help message."); + return; + } + + SteamGuardPath = SteamGuardPath.Replace("~", Environment.GetEnvironmentVariable("HOME")); + if (!Directory.Exists(SteamGuardPath)) + { + if (SteamGuardPath == defaultSteamGuardPath.Replace("~", Environment.GetEnvironmentVariable("HOME"))) + { + Console.WriteLine("warn: {0} does not exist, creating...", SteamGuardPath); + Directory.CreateDirectory(SteamGuardPath); + } + else + { + Console.WriteLine("error: {0} does not exist.", SteamGuardPath); + return; + } } } }