Skip to content

Bug: ListedItem.IsFolder is set to true if the item is a zip file which causes the app to crash #18740

Description

@Lamparter

Description

2026-07-18 19:56:34.5154|Error|System.IO.FileNotFoundException: Directory not found at path '%userprofile%\Downloads\runtime.any.App.net10.0-android.Environment-Release.zip'.
   at OwlCore.Storage.System.IO.SystemFolder..ctor(String path) in /_/src/System/IO/SystemFolder.cs:line 34
   at Files.App.Storage.Storables.NativeStorageLegacyService.GetFolderAsync(String id, CancellationToken cancellationToken)
   at Files.App.Actions.PinToStartAction.ExecuteAsync(Object parameter)
   at Files.App.Data.Commands.ActionCommand.Execute(Object parameter)
   at System.Threading.Tasks.Task.<>c.<ThrowAsync>b__124_0(Object state)
   at Microsoft.UI.Dispatching.DispatcherQueueSynchronizationContext.<>c__DisplayClass2_0.<Post>b__0()

When a zip file is represented through the ListedItem class, its IsFolder property is set to true.
Since this property is set to true, other parts of the code (specifically actions) will regard any zip file as a folder, causing a crash when attempting to perform an operation requiring a folder, particularly when resolving it via StorageService.GetFolderAsync().

Steps To Reproduce

  1. Attempted to perform any action relating to a folder on a zip file
  2. Observed that the app crashed / the action failed (exception was ignored without breaking)

Files Version

4.2.0.0

Windows Version

10.0.26200.8875

Log File

debug.log


  • Fix OpenTerminalAction
  • Fix PinToStartAction
  • Fix UnpinFromStartAction

I believe these are the only affected actions, but I'm not entirely sure.

Metadata

Metadata

Assignees

Labels

area - context menuFeatures or bug reports relating to the context menu

Type

Projects

Status
✅ Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions