This repository was archived by the owner on Apr 2, 2026. It is now read-only.
File tree Expand file tree Collapse file tree
src/AStar.Dev.File.App/ViewModels Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -109,9 +109,15 @@ private void Cancel()
109109
110110 private async Task LoadScannedFilesAsync ( )
111111 {
112+ var root = SelectedFolderPath ;
113+ // Normalise so the StartsWith check works regardless of trailing separator
114+ var prefix = root . TrimEnd ( System . IO . Path . DirectorySeparatorChar ,
115+ System . IO . Path . AltDirectorySeparatorChar )
116+ + System . IO . Path . DirectorySeparatorChar ;
117+
112118 await using var db = await _dbContextFactory . CreateDbContextAsync ( ) ;
113119 var files = await db . ScannedFiles
114- . Where ( f => f . RootPath == SelectedFolderPath )
120+ . Where ( f => f . FullPath . StartsWith ( prefix ) )
115121 . OrderBy ( f => f . FolderPath )
116122 . ThenBy ( f => f . FileName )
117123 . ToListAsync ( ) ;
You can’t perform that action at this time.
0 commit comments