Skip to content

Commit

Permalink
Update Tweak.xm
Browse files Browse the repository at this point in the history
  • Loading branch information
arichornlover authored Oct 12, 2024
1 parent e639218 commit 7f7e057
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions Tweak.xm
Original file line number Diff line number Diff line change
Expand Up @@ -2667,10 +2667,14 @@ NSBundle *YouTubeRebornBundle() {
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{
NSString *tweakBundlePath = [[NSBundle mainBundle] pathForResource:@"YouTubeReborn" ofType:@"bundle"];
if (tweakBundlePath)
bundle = [NSBundle bundleWithPath:tweakBundlePath];
else
bundle = [NSBundle bundleWithPath:ROOT_PATH_NS(@"/Library/Application Support/YouTubeReborn.bundle")];
char resolvedPath[PATH_MAX];
const char *rootPath = libroot_dyn_jbrootpath("/Library/Application Support/YouTubeReborn.bundle", resolvedPath);
if (tweakBundlePath) {
bundle = [NSBundle bundleWithPath:[NSString stringWithUTF8String:rootPath]];
} else {
bundle = [NSBundle bundleWithPath:@"/Library/Application Support/YouTubeReborn.bundle"];
}
}
});
return bundle;
}
Expand Down

0 comments on commit 7f7e057

Please sign in to comment.