Skip to content

Commit 5413825

Browse files
sync to latest Riru v8, sync code from Riru-LocationReportEnabler
1 parent 441620c commit 5413825

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

jni/main/main.cpp

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,10 @@ int is_app_need_hook(JNIEnv *env, jstring appDataDir) {
3333
return 0;
3434

3535

36+
if (access(FAKE_CONFIGURATION_GLOBAL, F_OK) == 0) {
37+
return 1;
38+
}
39+
3640
const char *app_data_dir = env->GetStringUTFChars(appDataDir, NULL);
3741

3842
int user = 0;
@@ -46,14 +50,11 @@ int is_app_need_hook(JNIEnv *env, jstring appDataDir) {
4650

4751
env->ReleaseStringUTFChars(appDataDir, app_data_dir);
4852

49-
if (access(FAKE_CONFIGURATION_GLOBAL, F_OK) == 0) {
50-
return 1;
51-
}
52-
5353
if (access(CONFIG_PATH "/packages", R_OK) != 0) {
5454
for (auto &s : packages) {
55-
if (strcmp(s.c_str(), package_name) == 0)
55+
if (strcmp(s.c_str(), package_name) == 0) {
5656
return 1;
57+
}
5758
}
5859
} else {
5960
char path[PATH_MAX];

0 commit comments

Comments
 (0)