Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- config& save_index::save_summary(std::string save)
- {
- /*
- * All saves are .gz files now so make sure we use that name when opening
- * a file. If not some parts of the code use the name with and some parts
- * without the .gz suffix.
- */
- if(save.length() < 3 || save.substr(save.length() - 3) != ".gz") {
- save += ".gz";
- }
- config& cfg = load();
- if (config &sv = cfg.find_child("save", "save", save))
- return sv;
- config &res = cfg.add_child("save");
- res["save"] = save;
- return res;
- }
Advertisement
Add Comment
Please, Sign In to add comment