-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Overwrite Default #20
Comments
I see. Rather than adding default |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I like (and use) this lib.
I'd prefer the overwrite of the config file to be the default, as usually one just reads, updates, and saves settings.
inline static void write(..., const bool overwrite=true) {...
i
f (!overwrite) {
if (struct stat buf; stat(filepath.c_str(), &buf) == 0) {
throw std::runtime_error("file: " + filepath + " already exist.");
}
} else {
system(("rm -rf " + iniFileName).c_str());
}
The text was updated successfully, but these errors were encountered: