Skip to content

Commit 7b3ef16

Browse files
authored
Fix: Fixed issue where archive files were counted as folders (#12621)
1 parent 82b0df7 commit 7b3ef16

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Files.App/ViewModels/Properties/Items/CombinedProperties.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,8 @@ public override async Task GetSpecialProperties()
6666
ViewModel.LastSeparatorVisibility = false;
6767
ViewModel.ItemSizeVisibility = true;
6868

69-
ViewModel.FilesCount += List.Where(x => x.PrimaryItemAttribute == StorageItemTypes.File).ToList().Count;
70-
ViewModel.FoldersCount += List.Where(x => x.PrimaryItemAttribute == StorageItemTypes.Folder).ToList().Count;
69+
ViewModel.FilesCount += List.Where(x => x.PrimaryItemAttribute == StorageItemTypes.File || x.IsArchive).ToList().Count;
70+
ViewModel.FoldersCount += List.Where(x => x.PrimaryItemAttribute == StorageItemTypes.Folder && !x.IsArchive).ToList().Count;
7171

7272
long totalSize = 0;
7373
long filesSize = List.Where(x => x.PrimaryItemAttribute == StorageItemTypes.File).Sum(x => x.FileSizeBytes);

0 commit comments

Comments
 (0)