From ff48c8ec072b8e712300511368813a66e7540cb7 Mon Sep 17 00:00:00 2001 From: Andrea Kanoczova Date: Sat, 25 Nov 2023 12:49:46 +0100 Subject: [PATCH] Archives in Recent files open in the same tab. RecentItem constructors changed to assign StoregeItemType Folder to archives --- src/Files.App/Utils/RecentItem/RecentItem.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Files.App/Utils/RecentItem/RecentItem.cs b/src/Files.App/Utils/RecentItem/RecentItem.cs index f6220e15b7f4..cb7c926b6e28 100644 --- a/src/Files.App/Utils/RecentItem/RecentItem.cs +++ b/src/Files.App/Utils/RecentItem/RecentItem.cs @@ -51,7 +51,7 @@ public RecentItem(ShellLinkItem linkItem) : base() LinkPath = linkItem.FilePath; RecentPath = linkItem.TargetPath; Name = NameOrPathWithoutExtension(linkItem.FileName); - Type = linkItem.IsFolder ? StorageItemTypes.Folder : StorageItemTypes.File; + Type = linkItem.IsFolder ? StorageItemTypes.Folder : ZipStorageFolder.IsZipPath(LinkPath) ? StorageItemTypes.Folder : StorageItemTypes.File; FolderImg = linkItem.IsFolder; FileIconVis = !linkItem.IsFolder; LastModified = linkItem.ModifiedDate; @@ -67,7 +67,7 @@ public RecentItem(ShellFileItem fileItem) : base() LinkPath = ShellStorageFolder.IsShellPath(fileItem.FilePath) ? fileItem.RecyclePath : fileItem.FilePath; // use true path on disk for shell items RecentPath = LinkPath; // intentionally the same Name = NameOrPathWithoutExtension(fileItem.FileName); - Type = fileItem.IsFolder ? StorageItemTypes.Folder : StorageItemTypes.File; + Type = fileItem.IsFolder ? StorageItemTypes.Folder : ZipStorageFolder.IsZipPath(LinkPath) ? StorageItemTypes.Folder : StorageItemTypes.File; FolderImg = fileItem.IsFolder; FileIconVis = !fileItem.IsFolder; LastModified = fileItem.ModifiedDate;