Skip to content

Commit

Permalink
change path -> crashing issue
Browse files Browse the repository at this point in the history
  • Loading branch information
m1337v committed Feb 29, 2024
1 parent 2d0bd01 commit a724867
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions RootHide/AppDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ - (void)showAlert:(NSString*)title message:(NSString*)message {
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
// Override point for customization after application launch.

NSString* roothideDir = @"/var/jb/var/mobile/Library/RootHide";
NSString* roothideDir = @"/var/mobile/Library/RootHide";
if(![NSFileManager.defaultManager fileExistsAtPath:roothideDir]) {
NSDictionary* attr = @{NSFilePosixPermissions:@(0755), NSFileOwnerAccountID:@(501), NSFileGroupOwnerAccountID:@(501)};
assert([NSFileManager.defaultManager createDirectoryAtPath:roothideDir withIntermediateDirectories:YES attributes:attr error:nil]);
Expand All @@ -72,14 +72,14 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(
if(err) NSLog(@"json error=%@", err);
assert(rules != NULL);
NSLog(@"default rules=%@", rules);
NSString *rulesFilePath = @"/var/jb/var/mobile/Library/RootHide/varCleanRules.plist";
NSString *rulesFilePath = @"/var/mobile/Library/RootHide/varCleanRules.plist";
if([NSFileManager.defaultManager fileExistsAtPath:rulesFilePath]) {
assert([NSFileManager.defaultManager removeItemAtPath:rulesFilePath error:nil]);
}
NSLog(@"copy default rules to %@", rulesFilePath);
assert([rules writeToFile:rulesFilePath atomically:YES]);

NSString *customedRulesFilePath = @"/var/jb/var/mobile/Library/RootHide/varCleanRules-custom.plist";
NSString *customedRulesFilePath = @"/var/mobile/Library/RootHide/varCleanRules-custom.plist";
if(![NSFileManager.defaultManager fileExistsAtPath:customedRulesFilePath]) {
NSDictionary* template = [[NSDictionary alloc] init];
assert([template writeToFile:customedRulesFilePath atomically:YES]);
Expand Down

0 comments on commit a724867

Please sign in to comment.