Skip to content

Commit

Permalink
undo rsync path change
Browse files Browse the repository at this point in the history
  • Loading branch information
Samgisaninja committed Mar 4, 2020
1 parent abc5931 commit 853102e
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 5 deletions.
4 changes: 2 additions & 2 deletions SuccessionRestore.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -623,7 +623,7 @@
"$(inherited)",
"$(PROJECT_DIR)/SuccessionRestore",
);
MARKETING_VERSION = "1.4.12~b3";
MARKETING_VERSION = "1.4.12~b5";
PRODUCT_BUNDLE_IDENTIFIER = com.samgisaninja.SuccessionRestore;
PRODUCT_NAME = "$(TARGET_NAME)";
TARGETED_DEVICE_FAMILY = "1,2";
Expand All @@ -649,7 +649,7 @@
"$(inherited)",
"$(PROJECT_DIR)/SuccessionRestore",
);
MARKETING_VERSION = "1.4.12~b3";
MARKETING_VERSION = "1.4.12~b5";
PRODUCT_BUNDLE_IDENTIFIER = com.samgisaninja.SuccessionRestore;
PRODUCT_NAME = "$(TARGET_NAME)";
TARGETED_DEVICE_FAMILY = "1,2";
Expand Down
Binary file not shown.
8 changes: 6 additions & 2 deletions SuccessionRestore/RestoreViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -593,12 +593,15 @@ -(void)successionRestore{
[self logToFile:@"using unsupported tethered downgrade as requested" atLineNumber:__LINE__];
[rsyncMutableArgs addObject:@"--exclude=/usr/share/firmware/"];
}
NSArray *rsyncArgs = [NSArray arrayWithArray:rsyncMutableArgs];
NSTask *rsyncTask = [[NSTask alloc] init];
[rsyncTask setLaunchPath:[[[NSBundle mainBundle] bundlePath] stringByAppendingPathComponent:@"succdatroot"]];
if ([[NSFileManager defaultManager] fileExistsAtPath:[_successionPrefs objectForKey:@"custom_rsync_path"]]) {
[self logToFile:[NSString stringWithFormat:@"found rsync at path: %@", [_successionPrefs objectForKey:@"custom_rsync_path"]] atLineNumber:__LINE__];
[rsyncMutableArgs insertObject:[_successionPrefs objectForKey:@"custom_rsync_path"] atIndex:0];
if ([(NSString *)[_successionPrefs objectForKey:@"custom_rsync_path"] isEqualToString:@"/usr/bin/rsync"]) {
[rsyncMutableArgs insertObject:@"rsync" atIndex:0];
} else {
[rsyncMutableArgs insertObject:[_successionPrefs objectForKey:@"custom_rsync_path"] atIndex:0];
}
} else {
[self logToFile:[NSString stringWithFormat:@"couldnt find rsync at path %@, checking /usr/bin/rsync to see if user accidentally changed preferences", [_successionPrefs objectForKey:@"custom_rsync_path"]] atLineNumber:__LINE__];
if ([[NSFileManager defaultManager] fileExistsAtPath:@"/usr/bin/rsync"]) {
Expand All @@ -614,6 +617,7 @@ -(void)successionRestore{
}
}
[self logToFile:[NSString stringWithFormat:@"/Applications/SuccessionRestore.app/succdatroot %@", [rsyncMutableArgs componentsJoinedByString:@" "]] atLineNumber:__LINE__];
NSArray *rsyncArgs = [NSArray arrayWithArray:rsyncMutableArgs];
[rsyncTask setArguments:rsyncArgs];
NSPipe *outputPipe = [NSPipe pipe];
[rsyncTask setStandardOutput:outputPipe];
Expand Down
2 changes: 1 addition & 1 deletion Template/DEBIAN/control
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: com.samgisaninja.successionrestore
Name: Succession
Version: 1.4.12-b4
Version: 1.4.12-b5
Architecture: iphoneos-arm
Description: Restore without updating via rootfilesystem DMG
Maintainer: Samg_is_a_Ninja
Expand Down

0 comments on commit 853102e

Please sign in to comment.