Skip to content

Overwrite Default #20

Description

@pyramid3d

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());
}

Activity

  1. SSARCandy commented on Oct 22, 2023

    @SSARCandy
    Owner

    I see. Rather than adding default overwrite = true, I would prefer overwrite=false to make it having same behavior as before.
    You can open PR for this. Great thanks~

  2. SSARCandy commented on May 30, 2026

    @SSARCandy
    Owner

    close in #24

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions