| 49 | #endif |
| 50 | |
| 51 | inline std::string GetFilePathByPlatform(const char* path) |
| 52 | { |
| 53 | std::string newPath(path); |
| 54 | |
| 55 | if(newPath.find("/mnt/sdcard/flex/data/") != std::string::npos) |
| 56 | { |
| 57 | LOGE("file have exit %s",path); |
| 58 | } |
| 59 | else |
| 60 | { |
| 61 | std::string rootPath = "/mnt/sdcard/flex/"; |
| 62 | size_t startPos = newPath.find("data/"); |
| 63 | if(startPos != std::string::npos) |
| 64 | { |
| 65 | newPath = rootPath + newPath.substr(startPos); |
| 66 | } |
| 67 | } |
| 68 | |
| 69 | return newPath; |
| 70 | } |
| 71 | #else |
| 72 | |
| 73 | inline std::string GetFilePathByPlatform(const char* path) |
no outgoing calls
no test coverage detected