-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Code Quality: Refactor launcher update logic and remove hash check #17890
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
I forgot to mention, you need to bump the version number before testing. |
|
of Files? If so it's still having the same issue. Already tried cleaning solution and uninstalling the existing install. |
Removed SHA256 hash file and related hash comparison logic from Files.App.Launcher update process. Now uses a branch file (Branch.txt) to determine if the launcher should be updated, simplifying the update mechanism. Updated PowerShell command to ensure Branch.txt is created during setup. This streamlines the update process and improves maintainability.
2785b59 to
57feb01
Compare
| .AsTask().ConfigureAwait(false); | ||
| await srcHashFile.CopyAsync(destFolder, "Files.App.Launcher.exe.sha256", NameCollisionOption.ReplaceExisting) | ||
| .AsTask().ConfigureAwait(false); | ||
| var srcExeFile = await StorageFile.GetFileFromApplicationUriAsync(new Uri("ms-appx:///Assets/FilesOpenDialog/Files.App.Launcher.exe")); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Noticed the .AsTask().ConfigureAwait(false) was dropped in the refactor. Given the method called from Task.Run, no immediate issue, but was this intentional or just streamlining?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was changed for consistency with the other update service.
| } | ||
|
|
||
| if (!hashEqual) | ||
| catch { } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it be useful to add logging to the empty catch blocks? In case of issues, we'd have visibility into whether it's file permission problems, corruption, etc.

Removed SHA256 hash file and related hash comparison logic from Files.App.Launcher update process. Now uses a branch file (Branch.txt) to determine if the launcher should be updated, simplifying the update mechanism. Updated PowerShell command to ensure Branch.txt is created during setup. This streamlines the update process and improves maintainability.
Resolved / Related Issues
To prevent extra work, all changes to the Files codebase must link to an approved issue marked as
Ready to build. Please insert the issue number following the hashtag with the issue number that this Pull Request resolves.Steps used to test these changes
This PR is a little challenging to test without deploying a preview build.