diff --git a/Makefile b/Makefile index 06e30a9..8f42579 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ export TARGET = iphone:clang:13.0:10.3 export ARCHS = arm64 arm64e -export VERSION = 0.9.10 +export VERSION = 0.9.11 export DEBUG = no CC = xcrun -sdk ${THEOS}/sdks/iPhoneOS13.0.sdk clang -arch arm64 -arch arm64e -miphoneos-version-min=10.3 LDID = ldid diff --git a/control b/control index 3f7bc44..7866a26 100644 --- a/control +++ b/control @@ -1,5 +1,5 @@ Package: com.michael.TimeMachine -Version: 0.9.10 +Version: 0.9.11 Section: Tweaks Name: TimeMachine on iOS Author: halo_michael diff --git a/setTimeMachine/setTimeMachine.m b/setTimeMachine/setTimeMachine.m index aabc073..395066d 100644 --- a/setTimeMachine/setTimeMachine.m +++ b/setTimeMachine/setTimeMachine.m @@ -186,8 +186,8 @@ int main(int argc, char **argv) { } NSString *filePath = [[NSString alloc] initWithUTF8String:filesystem]; - while ([filePath characterAtIndex:([filePath length] - 1)] == '/' && [filePath length] != 1) { - filePath = [filePath substringToIndex:([filePath length] - 1)]; + while ([filePath characterAtIndex:([[NSNumber numberWithUnsignedInteger:[filePath length]] intValue] - 1)] == '/' && [[NSNumber numberWithUnsignedInteger:[filePath length]] intValue] != 1) { + filePath = [filePath substringToIndex:([[NSNumber numberWithUnsignedInteger:[filePath length]] intValue] - 1)]; } NSError *error = nil; NSMutableDictionary *fileInfo = [NSMutableDictionary dictionaryWithDictionary:[[NSFileManager defaultManager] attributesOfItemAtPath:filePath error:&error]];