添加字符串为空判断

This commit is contained in:
蓝点lilac
2020-12-30 20:14:20 +08:00
parent e1c4170256
commit 17d39b71cb

View File

@@ -9,7 +9,7 @@ namespace BulePointLilac.Methods
public static string GetOpenMode(string extension)
{
string mode = Registry.GetValue($@"{FileExtsPath}\{extension}\UserChoice", "ProgId", null)?.ToString();
if(mode != null) return mode;
if(!string.IsNullOrEmpty(mode)) return mode;
mode = Registry.GetValue($@"HKEY_CLASSES_ROOT\{extension}", "", null)?.ToString();
return mode;
}