From 3997fd831da8248f13295ece8f286075b5b504e6 Mon Sep 17 00:00:00 2001 From: fajiao <1519100073@qq.com> Date: Tue, 2 Aug 2022 17:11:48 +0800 Subject: [PATCH] [fix] Environment.CurrentDirectory --- AutoWeightServer/Model/Config/ServerConfig.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/AutoWeightServer/Model/Config/ServerConfig.cs b/AutoWeightServer/Model/Config/ServerConfig.cs index c1501b1..e2ae57f 100644 --- a/AutoWeightServer/Model/Config/ServerConfig.cs +++ b/AutoWeightServer/Model/Config/ServerConfig.cs @@ -1,4 +1,5 @@ -using System; +using EC.Utils; +using System; using System.IO; namespace EC.AutoWeightServer.Model.Config @@ -44,7 +45,7 @@ namespace EC.AutoWeightServer.Model.Config public static string LightRelayCom { get; } = GetAppConfig("Light_Relay_COM"); public static int LightRelayBaudRate { get; } = FormatCom.ToInt(GetAppConfig("Light_Relay_BaudRate")); - public static string LightCodeName { get; } = Path.Combine(Environment.CurrentDirectory, "conf", GetAppConfig("Light_Code_Name")); + public static string LightCodeName { get; } = Path.Combine(CommonUtil.GetWorkDirectory(), "conf", GetAppConfig("Light_Code_Name")); public static int LightInterval { get; } = FormatCom.ToInt(GetAppConfig("Light_Interval")); public static int LightBlink { get; } = FormatCom.ToInt(GetAppConfig("Light_Blink"));