You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Launch files inside browsable archives through their streamed StorageFile representation instead of passing the virtual archive path to the Win32 shell path.
Initialize LauncherOptions with the Files window handle for the archive-entry launch path, matching the nearby user-initiated launcher flows.
Keep the existing Win32 fallback if the WinRT file launch fails.
Leave normal filesystem files and the existing image-specific neighboring-files flow unchanged.
Why
Files inside archives such as .jar have virtual paths like archive.jar\path\File.class. Passing that path to the Win32 shell does not point at a real filesystem item, so double-clicking non-image files inside .jar archives can do nothing. ZipStorageFile.ToStorageFileAsync() already materializes archive entries as streamed StorageFile objects, which is the launch path used for archive images.
Steps used to test these changes
Ran git diff --check.
Restored the missing server assets with dotnet restore src\Files.App.Server\Files.App.Server.csproj -p:Platform=x64 --nologo.
Ran dotnet build src\Files.App\Files.App.csproj -c Debug -p:Platform=x64 --no-restore --nologo; the build reached the app XAML compilation stage, then failed with WMC9999 because the local XAML compiler package could not load Microsoft.UI.Xaml.Markup.Compiler.ErrorMessages.resources.
Compared the new archive-entry launch path with the existing image and app-picker launch paths in NavigationHelpers.OpenFile.
Good catch. I pushed 26df283 to cover that case as well.
The archive branch now keeps the direct LaunchFileAsync(storageItem, options) path for entries that already have an association, but if that returns false, it retries the same extracted StorageFile with LauncherOptions.DisplayApplicationPicker = true before falling back to the old Win32 launch path. That should make unassociated archive entries show the Windows app picker instead of trying to shell-launch the virtual archive.jar\entry path.
Suggested manual checks for this PR:
Open a .jar in Files and double-click an entry whose extension has no default app. Expected: Windows "Open with" picker appears.
Pick an app such as Notepad and verify the extracted archive entry opens.
dotnet build src\Files.App\Files.App.csproj --no-restore -p:Configuration=Debug -p:Platform=x64 did not finish within 5 minutes in this checkout, so I stopped it and checked that no repo build processes were left running.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Resolved / Related Issues
Summary
StorageFilerepresentation instead of passing the virtual archive path to the Win32 shell path.LauncherOptionswith the Files window handle for the archive-entry launch path, matching the nearby user-initiated launcher flows.Why
Files inside archives such as
.jarhave virtual paths likearchive.jar\path\File.class. Passing that path to the Win32 shell does not point at a real filesystem item, so double-clicking non-image files inside.jararchives can do nothing.ZipStorageFile.ToStorageFileAsync()already materializes archive entries as streamedStorageFileobjects, which is the launch path used for archive images.Steps used to test these changes
git diff --check.dotnet restore src\Files.App.Server\Files.App.Server.csproj -p:Platform=x64 --nologo.dotnet build src\Files.App\Files.App.csproj -c Debug -p:Platform=x64 --no-restore --nologo; the build reached the app XAML compilation stage, then failed withWMC9999because the local XAML compiler package could not loadMicrosoft.UI.Xaml.Markup.Compiler.ErrorMessages.resources.NavigationHelpers.OpenFile.