🐛 Fix dozens of issues in new drive system

This commit is contained in:
2026-01-12 00:04:29 +08:00
parent 6d5303f99c
commit c052f17623
3 changed files with 7 additions and 1 deletions

View File

@@ -546,6 +546,7 @@ public class FileIndexController(
var fileIndexes = await db.FileIndexes
.Where(fi => fi.AccountId == accountId)
.Include(fi => fi.File)
.ThenInclude(f => f.Object)
.Where(fi =>
(string.IsNullOrEmpty(path) || fi.Path == FileIndexService.NormalizePath(path)) &&
(fi.File.Name.ToLower().Contains(searchTerm) ||

View File

@@ -141,6 +141,7 @@ public class FileIndexService(AppDatabase db)
return await db.FileIndexes
.Where(fi => fi.AccountId == accountId && fi.Path == normalizedPath)
.Include(fi => fi.File)
.ThenInclude(f => f.Object)
.ToListAsync();
}
@@ -154,6 +155,7 @@ public class FileIndexService(AppDatabase db)
return await db.FileIndexes
.Where(fi => fi.FileId == fileId)
.Include(fi => fi.File)
.ThenInclude(f => f.Object)
.ToListAsync();
}