mirror of
https://github.com/BluePointLilac/ContextMenuManager.git
synced 2026-01-14 06:04:00 +08:00
添加字符串为空判断
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user