Add pre-upload check for case conflicts
This commit is contained in:
parent
619ada437a
commit
927fcb2084
1 changed files with 7 additions and 0 deletions
|
@ -152,6 +152,13 @@ bool addons_client::upload_addon(const std::string& id, std::string& response_me
|
|||
this->last_error_data_ = utils::join(badnames, "\n");
|
||||
return false;
|
||||
}
|
||||
if(!check_case_insensitive_duplicates(addon_data, &badnames)){
|
||||
this->last_error_ =
|
||||
vgettext("The add-on <i>$addon_title</i> contains files or directories with case conflicts. "
|
||||
"File or directory names may not be differently-cased versions of the same string.", i18n_symbols);
|
||||
this->last_error_data_ = utils::join(badnames, "\n");
|
||||
return false;
|
||||
}
|
||||
|
||||
config request_buf, response_buf;
|
||||
request_buf.add_child("upload", cfg).add_child("data", addon_data);
|
||||
|
|
Loading…
Add table
Reference in a new issue