We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 48a5153 commit 2109996Copy full SHA for 2109996
src/Files.App/Helpers/Win32/Win32Helper.Storage.cs
@@ -29,7 +29,13 @@ public static partial class Win32Helper
29
public static async Task<string?> GetFileAssociationAsync(string filename, bool checkDesktopFirst = false)
30
{
31
if (checkDesktopFirst)
32
- return GetDesktopFileAssociation(filename) ?? (await GetUwpFileAssociations(filename)).FirstOrDefault();
+ {
33
+ var desktopAssociation = GetDesktopFileAssociation(filename);
34
+ if (desktopAssociation is not null)
35
+ return desktopAssociation;
36
+
37
+ return (await GetUwpFileAssociations(filename)).FirstOrDefault();
38
+ }
39
40
return (await GetUwpFileAssociations(filename)).FirstOrDefault() ?? GetDesktopFileAssociation(filename);
41
}
0 commit comments