Skip to content

Commit

Permalink
支持自定义discord目录
Browse files Browse the repository at this point in the history
  • Loading branch information
aiqinxuancai committed Dec 4, 2023
1 parent a3c1d16 commit 4f3b36c
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions DiscordProxyStart/Servers/WinStartManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,20 @@ internal class WinStartManager

public static void Start()
{


var iniPath = Path.Combine(AppContext.BaseDirectory, "Config.ini");

//如果配置文件中有配置
var setupPath = SetupPathHelper.GetInstallPath("Discord");
if (File.Exists(iniPath))
{
var path = IniFileHelper.GetIniValue(iniPath, "Config", "Path");
if (!string.IsNullOrWhiteSpace(path) && Directory.Exists(path))
{
setupPath = path;
}
}

if (string.IsNullOrEmpty(setupPath) || !Directory.Exists(setupPath))
{
Expand Down

0 comments on commit 4f3b36c

Please sign in to comment.