mirror of
https://github.com/stokebob/bnhtrade.git
synced 2026-05-18 19:48:23 +00:00
CLI now runs on linux as well as windows, changes required migrated from System.Data.SqlClient to Microsoft.Data.SqlClient and fixing server cert issue (it expired in 2020)
This commit is contained in:
@@ -12,7 +12,21 @@ namespace bnhtrade.Core
|
||||
{
|
||||
public string GetAppDataPath()
|
||||
{
|
||||
string path = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData) + @"\bnhtrade\";
|
||||
string path = null;
|
||||
if (OperatingSystem.IsWindows())
|
||||
{
|
||||
path = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData)
|
||||
+ @"\bnhtrade\";
|
||||
}
|
||||
else if (OperatingSystem.IsLinux() || OperatingSystem.IsMacOS())
|
||||
{
|
||||
path = Environment.GetFolderPath(Environment.SpecialFolder.UserProfile)
|
||||
+ "/.bnhtrade/";
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new PlatformNotSupportedException("Unsupported operating system");
|
||||
}
|
||||
return path;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user