fixed reserlution order

This commit is contained in:
chuanweizhang2013 2014-03-18 15:56:01 +08:00
parent da26dc0138
commit a346d71a91
1 changed files with 5 additions and 1 deletions

View File

@ -302,7 +302,11 @@ std::string FileUtilsApple::getFullPathForDirectoryAndFilename(const std::string
} }
else else
{ {
std::string fullPath = directory+filename; std::string fullPath = directory;
if (!directory.empty() && directory[directory.length()-1] != '/')
fullPath.append("/");
fullPath.append(filename);
// Search path is an absolute path. // Search path is an absolute path.
if ([s_fileManager fileExistsAtPath:[NSString stringWithUTF8String:fullPath.c_str()]]) { if ([s_fileManager fileExistsAtPath:[NSString stringWithUTF8String:fullPath.c_str()]]) {
return fullPath; return fullPath;