From bd4ee2542af1ea9bbfe78967fa8674b13be73ecd Mon Sep 17 00:00:00 2001 From: cKey <35512826+colinin@users.noreply.github.com> Date: Thu, 21 Oct 2021 16:23:41 +0800 Subject: [PATCH] fix(oss): fixed oss container root directory might not exist --- .../Abp/OssManagement/FileSystem/FileSystemOssContainer.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/aspnet-core/modules/oss-management/LINGYUN.Abp.OssManagement.FileSystem/LINGYUN/Abp/OssManagement/FileSystem/FileSystemOssContainer.cs b/aspnet-core/modules/oss-management/LINGYUN.Abp.OssManagement.FileSystem/LINGYUN/Abp/OssManagement/FileSystem/FileSystemOssContainer.cs index 0d29fd6c4..5e31d3d9c 100644 --- a/aspnet-core/modules/oss-management/LINGYUN.Abp.OssManagement.FileSystem/LINGYUN/Abp/OssManagement/FileSystem/FileSystemOssContainer.cs +++ b/aspnet-core/modules/oss-management/LINGYUN.Abp.OssManagement.FileSystem/LINGYUN/Abp/OssManagement/FileSystem/FileSystemOssContainer.cs @@ -515,6 +515,8 @@ namespace LINGYUN.Abp.OssManagement.FileSystem { blobPath = Path.Combine(blobPath, "tenants", CurrentTenant.Id.Value.ToString("D")); } + // fix bug: 新租户可能无法检索不存在的目录,blob的根目录将自动创建 + DirectoryHelper.CreateIfNotExists(blobPath); if (fileSystemConfiguration.AppendContainerNameToBasePath && !bucketName.IsNullOrWhiteSpace())