void archive_addon(const std::string& addon_name, config& cfg) { const std::string parentd = filesystem::get_addons_dir(); std::pair<std::vector<std::string>, std::vector<std::string> > ignore_patterns; ignore_patterns = read_ignore_patterns(addon_name); archive_dir(parentd, addon_name, cfg.add_child("dir"), ignore_patterns); }
void archive_addon(const std::string& addon_name, config& cfg) { const std::string parentd = get_addon_campaigns_dir(); std::pair<std::vector<std::string>, std::vector<std::string> > ignore_patterns; // External .cfg may not exist; newer campaigns have a _main.cfg const std::string external_cfg = addon_name + ".cfg"; if (file_exists(parentd + "/" + external_cfg)) { archive_file(parentd, external_cfg, cfg.add_child("file")); } ignore_patterns = read_ignore_patterns(addon_name); archive_dir(parentd, addon_name, cfg.add_child("dir"), ignore_patterns); }