uaasscrum-827 - more robust umbraco.config
This commit is contained in:
@@ -870,8 +870,15 @@ namespace umbraco
|
||||
catch (Exception e)
|
||||
{
|
||||
// if something goes wrong remove the file
|
||||
try
|
||||
{
|
||||
DeleteXmlFile();
|
||||
|
||||
}
|
||||
catch
|
||||
{
|
||||
// don't make it worse: could be that we failed to write because we cannot
|
||||
// access the file, in which case we won't be able to delete it either
|
||||
}
|
||||
LogHelper.Error<content>("Failed to save Xml to file.", e);
|
||||
}
|
||||
}
|
||||
@@ -933,7 +940,15 @@ namespace umbraco
|
||||
catch (Exception e)
|
||||
{
|
||||
LogHelper.Error<content>("Failed to load Xml from file.", e);
|
||||
try
|
||||
{
|
||||
DeleteXmlFile();
|
||||
}
|
||||
catch
|
||||
{
|
||||
// don't make it worse: could be that we failed to read because we cannot
|
||||
// access the file, in which case we won't be able to delete it either
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user