Skip to content

Commit

Permalink
fix: fix access invocations, again
Browse files Browse the repository at this point in the history
  • Loading branch information
dhinakg committed Jun 3, 2024
1 parent 377b43e commit 52cafe4
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions injector/injector.c
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ static bool tweak_needinject(const char* orig_path, bool* isTweakManager) {

char* path = append_str(orig_path, ".plist");

if (!access(path, F_OK)) {
if (access(path, F_OK) != 0) {
free(path);
return false;
}
Expand Down Expand Up @@ -279,11 +279,11 @@ static void tweaks_iterate(void) {

#if !TARGET_OS_OSX
if (rootless) {
if (!access(OLDABI_PATH_ROOTLESS, F_OK)) {
if (access(OLDABI_PATH_ROOTLESS, F_OK) == 0) {
dlopen(OLDABI_PATH_ROOTLESS, RTLD_LAZY);
}
} else {
if (!access(OLDABI_PATH_ROOTFUL, F_OK)) {
if (access(OLDABI_PATH_ROOTFUL, F_OK) == 0) {
dlopen(OLDABI_PATH_ROOTFUL, RTLD_LAZY);
}
}
Expand Down Expand Up @@ -317,7 +317,7 @@ __attribute__((constructor)) static void injection_init(void) {

#if !TARGET_OS_OSX

if (!access("/var/jb/usr/lib/ellekit/libinjector.dylib", F_OK)) {
if (access("/var/jb/usr/lib/ellekit/libinjector.dylib", F_OK) == 0) {
rootless = true;
}

Expand All @@ -331,7 +331,7 @@ __attribute__((constructor)) static void injection_init(void) {
}
}

if (!access("/var/mobile/.eksafemode", F_OK)) {
if (access("/var/mobile/.eksafemode", F_OK) == 0) {
return;
}
#endif
Expand Down

0 comments on commit 52cafe4

Please sign in to comment.