Skip to content

Commit

Permalink
Fix false positives for default content
Browse files Browse the repository at this point in the history
There isn't a good reason to have default content checks be case sensitive. That just means behavior will be inconsistent between systems (e.g. Windows player sees a different models).
  • Loading branch information
wootguy committed Sep 6, 2018
1 parent b94330a commit d9ea784
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions src/util.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -929,14 +929,7 @@ bool is_unique(set_icase& list, string val)

bool is_default_file(string file)
{
auto defaultFile = default_content.find(file);
if (defaultFile != default_content.end())
{
if (case_sensitive_mode)
return std::equal((*defaultFile).rbegin(), (*defaultFile).rend(), file.rbegin());
return true;
}
return false;
return default_content.find(file) != default_content.end();
}

string toLowerCase(string str)
Expand Down

0 comments on commit d9ea784

Please sign in to comment.