Skip to content

Commit e0f5c48

Browse files
authored
Fix: Fixed potential crash that could occur when updating Files (#15733)
1 parent a4e9fa0 commit e0f5c48

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Files.App/Services/App/AppUpdateSideloadService.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,13 +150,13 @@ public async Task CheckAndUpdateFilesLauncherAsync()
150150
var destFolderPath = Path.Combine(UserDataPaths.GetDefault().LocalAppData, "Files");
151151
var destExeFilePath = Path.Combine(destFolderPath, "Files.App.Launcher.exe");
152152

153-
if (Path.Exists(destExeFilePath))
153+
if (File.Exists(destExeFilePath))
154154
{
155155
var hashEqual = false;
156156
var srcHashFile = await StorageFile.GetFileFromApplicationUriAsync(new Uri("ms-appx:///Assets/FilesOpenDialog/Files.App.Launcher.exe.sha256"));
157157
var destHashFilePath = Path.Combine(destFolderPath, "Files.App.Launcher.exe.sha256");
158158

159-
if (Path.Exists(destHashFilePath))
159+
if (File.Exists(destHashFilePath))
160160
{
161161
using var srcStream = (await srcHashFile.OpenReadAsync()).AsStream();
162162
using var destStream = File.OpenRead(destHashFilePath);

0 commit comments

Comments
 (0)