Skip to content
This repository has been archived by the owner on Apr 25, 2024. It is now read-only.

Commit

Permalink
fixed the reset preferences for rootless
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexandra authored and Alexandra committed Apr 28, 2023
1 parent 3cb4e11 commit ff82d17
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion Preferences/Controllers/EnekoRootListController.m
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,13 @@ - (void)resetPreferences {
[userDefaults removeObjectForKey:key];
}

[[NSFileManager defaultManager] removeItemAtPath:[NSString stringWithFormat:@"/var/mobile/Library/Preferences/%@/", kPreferencesIdentifier] error:nil];
NSArray* paths = @[
[NSString stringWithFormat:@"/var/mobile/Library/Preferences/%@/", kPreferencesIdentifier],
[NSString stringWithFormat:@"/var/jb/var/mobile/Library/Preferences/%@/", kPreferencesIdentifier]
];
for (NSString* path in paths) {
[[NSFileManager defaultManager] removeItemAtPath:path error:nil];
}

[self reloadSpecifiers];
CFNotificationCenterPostNotification(CFNotificationCenterGetDarwinNotifyCenter(), (CFStringRef)kNotificationKeyPreferencesReload, nil, nil, YES);
Expand Down

0 comments on commit ff82d17

Please sign in to comment.