From dc8451f55c8e68bc9042ced73e7dddc16085336f Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Fri, 8 Dec 2023 12:44:35 +0800 Subject: [PATCH] =?UTF-8?q?windows=20linux=20=E7=8E=AF=E5=A2=83=E8=B7=AF?= =?UTF-8?q?=E5=BE=84=E4=BF=AE=E6=94=B9=20=E8=BF=81=E7=A7=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- IRaCIS.Core.Application/Helper/FileStoreHelper.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/IRaCIS.Core.Application/Helper/FileStoreHelper.cs b/IRaCIS.Core.Application/Helper/FileStoreHelper.cs index cb8d71b66..fe661146d 100644 --- a/IRaCIS.Core.Application/Helper/FileStoreHelper.cs +++ b/IRaCIS.Core.Application/Helper/FileStoreHelper.cs @@ -142,8 +142,9 @@ public static class FileStoreHelper //API vue 部署目录 public static string GetIRaCISRootPath(IWebHostEnvironment _hostEnvironment) { - var rootPath = (Directory.GetParent(_hostEnvironment.ContentRootPath.TrimEnd('\\'))).IfNullThrowException().FullName; - return rootPath; + string parentDirectory = Path.GetFullPath(Path.Combine(_hostEnvironment.ContentRootPath, "..")); + + return parentDirectory; }