Fixed the emptiness check for the addon's meta

This commit is contained in:
Artem Khrapov 2020-11-18 23:46:33 +03:00 committed by GitHub
parent 00df26e116
commit 4ca02ba8a4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -373,7 +373,7 @@ void server::load_config()
for(const std::string& addon_dir : dirs) {
in = filesystem::istream_file(filesystem::normalize_path("data/" + addon_dir + "/addon.cfg"));
read(meta, *in);
if(meta) {
if(!meta.empty()) {
addons_.emplace(meta["name"].str(), meta);
} else {
throw filesystem::io_exception("Failed to load addon from dir '" + addon_dir + "'\n");