Added static SteamGuardPath property
This commit is contained in:
parent
949944e330
commit
d860b6f6eb
1 changed files with 21 additions and 0 deletions
21
Program.cs
21
Program.cs
|
@ -1,9 +1,14 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
using System.IO;
|
||||||
|
|
||||||
public static class Program
|
public static class Program
|
||||||
{
|
{
|
||||||
|
const string defaultSteamGuardPath = "~/maFiles";
|
||||||
|
|
||||||
|
public static string SteamGuardPath { get; set; } = defaultSteamGuardPath;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The main entry point for the application
|
/// The main entry point for the application
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -15,6 +20,22 @@ public static class Program
|
||||||
Console.WriteLine("steamguard-cli - v0.0");
|
Console.WriteLine("steamguard-cli - v0.0");
|
||||||
Console.WriteLine();
|
Console.WriteLine();
|
||||||
Console.WriteLine("--help, -h Display this help message.");
|
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;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue