修改缩略图切换路径
parent
e736fe6557
commit
b991e9950f
|
@ -147,8 +147,11 @@ namespace IRaCIS.Core.Application.Services
|
||||||
|
|
||||||
#region 切换磁盘存储后
|
#region 切换磁盘存储后
|
||||||
|
|
||||||
var physicalPath = string.Empty;
|
var physicalPath = FileStoreHelper.GetPhysicalFilePath(_hostEnvironment, path);
|
||||||
|
|
||||||
|
//不存在,去其他路径找
|
||||||
|
if (!File.Exists(physicalPath))
|
||||||
|
{
|
||||||
//找到所有磁盘
|
//找到所有磁盘
|
||||||
var drives = DriveInfo.GetDrives()
|
var drives = DriveInfo.GetDrives()
|
||||||
.Where(d => d.DriveType == DriveType.Fixed && d.IsReady)
|
.Where(d => d.DriveType == DriveType.Fixed && d.IsReady)
|
||||||
|
@ -165,11 +168,14 @@ namespace IRaCIS.Core.Application.Services
|
||||||
{
|
{
|
||||||
physicalPath = Path.Combine(drive, _hostEnvironment.EnvironmentName, path.Trim('/'));
|
physicalPath = Path.Combine(drive, _hostEnvironment.EnvironmentName, path.Trim('/'));
|
||||||
|
|
||||||
if(File.Exists(physicalPath))
|
if (File.Exists(physicalPath))
|
||||||
{
|
{
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue