| 35 | } |
| 36 | |
| 37 | const char *IO::redirectPath(const char *__path) { |
| 38 | list<IO::RelocateInfo>::iterator iterator; |
| 39 | for (iterator = relocate_rule.begin(); iterator != relocate_rule.end(); ++iterator) { |
| 40 | IO::RelocateInfo info = *iterator; |
| 41 | if (strstr(__path, info.targetPath) && !strstr(__path, "/virtual/")) { |
| 42 | char *ret = replace(__path, info.targetPath, info.relocatePath); |
| 43 | // ALOGD("redirectPath %s => %s", __path, ret); |
| 44 | return ret; |
| 45 | } |
| 46 | } |
| 47 | return __path; |
| 48 | } |
| 49 | |
| 50 | jstring IO::redirectPath(JNIEnv *env, jstring path) { |
| 51 | // const char * pathC = env->GetStringUTFChars(path, JNI_FALSE); |