diff --git a/ContextMenuManager/Controls/EnhanceMenusList.cs b/ContextMenuManager/Controls/EnhanceMenusList.cs index fb585e3..b7eb36d 100644 --- a/ContextMenuManager/Controls/EnhanceMenusList.cs +++ b/ContextMenuManager/Controls/EnhanceMenusList.cs @@ -32,8 +32,8 @@ namespace ContextMenuManager.Controls if(!File.Exists(xmlPath)) return; this.AddItem(groupItem); XmlDocument doc = new XmlDocument(); - try { doc.LoadXml(File.ReadAllText(xmlPath, EncodingType.GetType(xmlPath))); } - catch { return; } + try { doc.LoadXml(File.ReadAllText(xmlPath, EncodingType.GetType(xmlPath)).Trim()); } + catch(Exception e) { MessageBoxEx.Show(e.Message); return; } foreach(XmlNode xn in doc.DocumentElement.ChildNodes) { try diff --git a/ContextMenuManager/Controls/ShellList.cs b/ContextMenuManager/Controls/ShellList.cs index fa3e53e..3f645e9 100644 --- a/ContextMenuManager/Controls/ShellList.cs +++ b/ContextMenuManager/Controls/ShellList.cs @@ -512,7 +512,7 @@ namespace ContextMenuManager.Controls private void LoadUwpModeItem(string xmlPath) { XmlDocument doc = new XmlDocument(); - try { doc.LoadXml(File.ReadAllText(xmlPath, EncodingType.GetType(xmlPath))); } + try { doc.LoadXml(File.ReadAllText(xmlPath, EncodingType.GetType(xmlPath)).Trim()); } catch { return; } foreach(XmlElement sceneXE in doc.DocumentElement.ChildNodes) { diff --git a/ContextMenuManager/Controls/ThirdRulesList.cs b/ContextMenuManager/Controls/ThirdRulesList.cs index ba3afc8..a182a94 100644 --- a/ContextMenuManager/Controls/ThirdRulesList.cs +++ b/ContextMenuManager/Controls/ThirdRulesList.cs @@ -32,8 +32,8 @@ namespace ContextMenuManager.Controls if(!File.Exists(xmlPath)) return; this.AddItem(groupItem); XmlDocument doc = new XmlDocument(); - try { doc.LoadXml(File.ReadAllText(xmlPath, EncodingType.GetType(xmlPath))); } - catch { return; } + try { doc.LoadXml(File.ReadAllText(xmlPath, EncodingType.GetType(xmlPath)).Trim()); } + catch(Exception e) { MessageBoxEx.Show(e.Message); return; } foreach(XmlElement groupXE in doc.DocumentElement.ChildNodes) { try