Skip to content

Commit

Permalink
Eat an invalid_utf8_exception
Browse files Browse the repository at this point in the history
  • Loading branch information
AI0867 authored and GregoryLundberg committed Nov 30, 2017
1 parent 51fa9bc commit bc995c9
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/addon/client.cpp
Expand Up @@ -142,7 +142,14 @@ bool addons_client::upload_addon(const std::string& id, std::string& response_me
cfg["name"] = id;

config addon_data;
archive_addon(id, addon_data);
try {
archive_addon(id, addon_data);
} catch(utf8::invalid_utf8_exception&){
this->last_error_ =
vgettext("The add-on <i>$addon_title</i> has a file or directory "
"containing invalid characters and cannot be published.", i18n_symbols);
return false;
}

std::vector<std::string> badnames;
if(!check_names_legal(addon_data, &badnames)){
Expand Down

0 comments on commit bc995c9

Please sign in to comment.