From 7bf096ddb1b47c9c77aa72edfab52fb049d76cfe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E5=9B=BD=E4=BC=9F?= <366193849@qq.com> Date: Thu, 19 Aug 2021 12:50:15 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=AD=90=E9=85=8D=E7=BD=AE?= =?UTF-8?q?=E6=96=87=E4=BB=B6=E7=9A=84=E7=9B=B8=E5=AF=B9=E8=B7=AF=E5=BE=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- FastGithub/Program.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/FastGithub/Program.cs b/FastGithub/Program.cs index 51548d2..e072fa6 100644 --- a/FastGithub/Program.cs +++ b/FastGithub/Program.cs @@ -34,10 +34,12 @@ namespace FastGithub }) .ConfigureAppConfiguration(c => { - if (Directory.Exists("appsettings") == true) + const string APPSETTINGS = "appsettings"; + if (Directory.Exists(APPSETTINGS) == true) { - foreach (var jsonFile in Directory.GetFiles("appsettings", "appsettings.*.json")) + foreach (var file in Directory.GetFiles(APPSETTINGS, "appsettings.*.json")) { + var jsonFile = Path.Combine(APPSETTINGS, Path.GetFileName(file)); c.AddJsonFile(jsonFile, true, true); } }