Skip to content

Commit

Permalink
Add pre-upload check for case conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
AI0867 authored and GregoryLundberg committed Nov 30, 2017
1 parent e0f5772 commit b40a69f
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/addon/client.cpp
Expand Up @@ -164,6 +164,13 @@ bool addons_client::upload_addon(const std::string& id, std::string& response_me
this->last_error_data_ = font::escape_text(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);
Expand Down

0 comments on commit b40a69f

Please sign in to comment.