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:
James Chen 2014-03-19 17:57:40 +08:00
commit db4dd81030
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()