closed #4450: FileUtils::addSearchResolutionsOrder doesn't check whether there is a 'slash' at the end of path.

This commit is contained in:
James Chen 2014-03-19 17:56:29 +08:00
parent d5327c2465
commit a84873a67b
1 changed files with 5 additions and 1 deletions

View File

@ -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()