From ff82d17a24d6d68b265160dafb9d7b2282f73215 Mon Sep 17 00:00:00 2001 From: Alexandra Date: Fri, 28 Apr 2023 23:24:18 +0200 Subject: [PATCH] fixed the reset preferences for rootless --- Preferences/Controllers/EnekoRootListController.m | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Preferences/Controllers/EnekoRootListController.m b/Preferences/Controllers/EnekoRootListController.m index 1bb56db..dbecd73 100644 --- a/Preferences/Controllers/EnekoRootListController.m +++ b/Preferences/Controllers/EnekoRootListController.m @@ -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);