|
@@ -38,8 +38,8 @@
|
|
|
|
|
|
- (void)repackageInCurrentDirectoryWithArch:(NSString *)newArch {
|
|
|
|
|
|
- NSString *fakeRoot = [[HelperClass returnForProcess:@"/usr/bin/which fakeroot"] componentsJoinedByString:@"\n"];
|
|
|
- NSString *pwd = [[HelperClass returnForProcess:@"/bin/pwd"] componentsJoinedByString:@"\n"];
|
|
|
+ NSString *fakeRoot = [HelperClass singleLineReturnForProcess:@"/usr/bin/which fakeroot"];
|
|
|
+ NSString *pwd = [HelperClass singleLineReturnForProcess:@"/bin/pwd"];
|
|
|
DLog(@"\nProcessing file: %@\n", self.path);
|
|
|
InputPackage *output = self;
|
|
|
|
|
@@ -75,6 +75,16 @@
|
|
|
|
|
|
if (obj.type == BSPackageFileTypeFile || obj.type == BSPackageFileTypeDirectory){
|
|
|
|
|
|
+ //DLog(@"processing path: %@", obj.path);
|
|
|
+ if ([obj.path isEqualToString:@"/private/var/mobile/Applications/"]){
|
|
|
+
|
|
|
+ NSString *badPath = [tmpPath stringByAppendingPathComponent:obj.path];
|
|
|
+ NSString *newPath = [tmpPath stringByAppendingPathComponent:@"Applications"];
|
|
|
+ DLog(@"\n [INFO] Moving %@ to %@...", badPath, newPath);
|
|
|
+ [FM moveItemAtPath:badPath toPath:newPath error:nil];
|
|
|
+ [FM removeItemAtPath:[tmpPath stringByAppendingPathComponent:@"private"] error:nil];
|
|
|
+ *stop = TRUE;
|
|
|
+ }
|
|
|
|
|
|
NSString *fullPath = [tmpPath stringByAppendingPathComponent:obj.path];
|
|
|
|
|
@@ -90,7 +100,7 @@
|
|
|
{
|
|
|
|
|
|
NSString *rootPath = [pathComponents objectAtIndex:1];
|
|
|
- DLog(@"\n Checking root path: %@ for file %@\n", rootPath, obj.path);
|
|
|
+ //DLog(@"\n Checking root path: %@ for file %@\n", rootPath, obj.path);
|
|
|
if ([forbiddenRoots containsObject:rootPath])
|
|
|
{
|
|
|
DLog(@"\n [ERROR] package file: '%@' would overwrite symbolic link at '%@'\n\n", obj.path, rootPath);
|