RickStrahl / Westwind.ApplicationConfiguration

Strongly typed, code-first configuration classes for .NET applications
http://west-wind.com/westwind.applicationconfiguration/
178 stars 36 forks source link

Fixed issue where existing XML config file would get overwritten if XML was not well-formed #10

Closed dieterrosch closed 10 years ago

dieterrosch commented 10 years ago

There is an issue in the XmlFileConfigurationProvider that would overwrite an existing XML file if the XML contents were not well-formed.

The fix simply checks if the file exists, and if it does, rather than overwrite it (thereby throwing away any config that was stored in it), it throws an exception.

RickStrahl commented 10 years ago

Merged and slightly modified...