refactor
This commit is contained in:
@@ -146,9 +146,7 @@ void ContentPack::scanFolder(
|
||||
std::vector<std::string> ContentPack::worldPacksList(const fs::path& folder) {
|
||||
fs::path listfile = folder / fs::path("packs.list");
|
||||
if (!fs::is_regular_file(listfile)) {
|
||||
std::cerr << "warning: packs.list not found (will be created)";
|
||||
std::cerr << std::endl;
|
||||
files::write_string(listfile, "# autogenerated, do not modify\nbase\n");
|
||||
throw std::runtime_error("missing file 'packs.list'");
|
||||
}
|
||||
return files::read_list(listfile);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user