private static void ReplaceXMLRootElement()
{
try
{
// If log4net element is found, it means that the root element is already correct.
XmlElement element = ConfigManager.CurrentConfig.GetLog4NetConfig();
if (element != null)
return;
}
catch (Exception)
{
// Replace root XML element from <sparkleshare> to <CmisSync>
var fileContents = System.IO.File.ReadAllText(ConfigManager.CurrentConfigFile);
fileContents = fileContents.Replace("<sparkleshare>", "<CmisSync>");
fileContents = fileContents.Replace("</sparkleshare>", "</CmisSync>");
System.IO.File.WriteAllText(ConfigManager.CurrentConfigFile, fileContents);
}
}
/// <summary>