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; }