Skip to content

Commit

Permalink
[fix]拉取上级目录时,要去掉后面斜杠,并智能识别目录
Browse files Browse the repository at this point in the history
  • Loading branch information
nnhy committed Dec 23, 2024
1 parent 046e841 commit 27d9a75
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Stardust.Extensions/Caches/CacheFileProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,7 @@ public IDirectoryContents GetDirectoryContents(String subpath)

async Task<String?> DownloadDirectory(String subpath, String fullPath, String[] svrs)
{
subpath = subpath.TrimEnd('/');
var span = DefaultSpan.Current;
foreach (var item in svrs)
{
Expand All @@ -256,7 +257,7 @@ public IDirectoryContents GetDirectoryContents(String subpath)
Name = HttpUtility.UrlDecode(e.FullName + ""),
LastModified = e.Time.Year > 2000 ? e.Time : DateTime.Now,
Exists = true,
IsDirectory = false,
IsDirectory = e.Hash.IsNullOrEmpty(),
}).ToList();

var csv = new CsvDb<FileInfoModel> { FileName = fullPath };
Expand Down

0 comments on commit 27d9a75

Please sign in to comment.