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 f032a36 commit 11b054bCopy full SHA for 11b054b
src/Files.App/Helpers/Win32/Win32Helper.Storage.cs
@@ -166,7 +166,13 @@ public static Task StartSTATask(Action action)
166
public static async Task<string?> GetFileAssociationAsync(string filename, bool checkDesktopFirst = false)
167
{
168
if (checkDesktopFirst)
169
- return GetDesktopFileAssociation(filename) ?? (await GetUwpFileAssociations(filename)).FirstOrDefault();
+ {
170
+ var desktopAssociation = GetDesktopFileAssociation(filename);
171
+ if (desktopAssociation is not null)
172
+ return desktopAssociation;
173
+
174
+ return (await GetUwpFileAssociations(filename)).FirstOrDefault();
175
+ }
176
177
return (await GetUwpFileAssociations(filename)).FirstOrDefault() ?? GetDesktopFileAssociation(filename);
178
}
0 commit comments