mirror of https://github.com/axmolengine/axmol.git
Merge pull request #5871 from dumganhar/iss4450-missing-slash
closed #4450: FileUtils::addSearchResolutionsOrder doesn't check whether there is a 'slash' at the end of path.
This commit is contained in:
commit
db4dd81030
|
@ -742,7 +742,11 @@ void FileUtils::setSearchResolutionsOrder(const std::vector<std::string>& search
|
|||
|
||||
void FileUtils::addSearchResolutionsOrder(const std::string &order)
|
||||
{
|
||||
_searchResolutionsOrderArray.push_back(order);
|
||||
std::string resOrder = order;
|
||||
if (!resOrder.empty() && resOrder[resOrder.length()-1] != '/')
|
||||
resOrder.append("/");
|
||||
|
||||
_searchResolutionsOrderArray.push_back(resOrder);
|
||||
}
|
||||
|
||||
const std::vector<std::string>& FileUtils::getSearchResolutionsOrder()
|
||||
|
|
Loading…
Reference in New Issue