Skip to content
This repository was archived by the owner on Dec 18, 2018. It is now read-only.

IniFileConfigurationSource.Commit() cannot handle empty value #103

Closed
ChengTian opened this issue Jul 8, 2014 · 0 comments
Closed

IniFileConfigurationSource.Commit() cannot handle empty value #103

ChengTian opened this issue Jul 8, 2014 · 0 comments
Assignees
Milestone

Comments

@ChengTian
Copy link
Contributor

Assume we have an ini file config.ini

; No value for this key
DefaultKey=

Then we do

var config = new IniFileConfigurationSource("config.ini");
config.Set("DefaultKey", "Value");
config.Commit();

The last line throws an exception because empty value is not handled properly. The expected behavior is that config.ini file is updated to

; No value for this key
DefaultKey=Value
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant