Fix: Fixed error dialog from appearing after updates #16864
Merged
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
explanation
The LaunchArgs are evaluated here when Files is started. Here an explicit check is made for files-dev.exe or files-dev. (Or, depending on the environment, for files-stable, ...)
After the update, however, files-dev.exe is not called from the %localappdata%\Microsoft\WindowsApps folder, but rather Files.exe is called directly from the C:\Program Files\WindowsApps<AppDirectory>\ folder.
Example: “C:\Program Files\WindowsApps\FilesPreview_3.8.0.0_x64__cnsc1k9bd01st\Files.App\Files.exe”
Since there is also a space at the end of the LaunchArgs, the TrimEnd is required so that no additional empty tab is opened.
Steps used to test these changes
For testing I built two Files versions locally and customized the Updater class to use the local msix packages. Code can be found here
After the update, Files is now started and no additional tab is opened.