|
@@ -187,7 +187,7 @@
|
|
|
|
|
|
NSString *error = [NSString stringWithFormat:@" [WARNING] %@ will overwrite the following files: \n\n\t%@\n\n", self.path.lastPathComponent, [safePackage.overwriteFiles componentsJoinedByString:@"\n\t"]];
|
|
|
if (!self.forceOverwrite) {
|
|
|
- if(![HelperClass shouldContinueWithError:error]){
|
|
|
+ if(![HelperClass shouldContinueWithPrompt:error]){
|
|
|
|
|
|
return -1;
|
|
|
}
|
|
@@ -564,9 +564,20 @@
|
|
|
DLog(@"[INFO] moving %@ to %@", oldPath, newPath);
|
|
|
[FM moveItemAtPath:oldPath toPath:newPath error:nil];
|
|
|
}];
|
|
|
- NSString *depArchiveInfo = [NSString stringWithFormat:@"%@ -b %@ %@", dpkg, self.packageName, [self fullPackageName]];
|
|
|
+ NSString *fullName = [self fullPackageName];
|
|
|
+ if ([FM fileExistsAtPath:fullName]){
|
|
|
+ NSString *overwritePrompt = [NSString stringWithFormat:@"%@ already exists, continuing will overwrite it.", fullName];
|
|
|
+ BOOL shouldOverwrite = [HelperClass shouldContinueWithPrompt:overwritePrompt];
|
|
|
+ if (shouldOverwrite) {
|
|
|
+ [FM removeItemAtPath:fullName error:nil];
|
|
|
+ } else {
|
|
|
+ DLog(@"Not overwriting file... bailing out!");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ NSString *depArchiveInfo = [NSString stringWithFormat:@"%@ -b %@ %@", dpkg, self.packageName, fullName];
|
|
|
if (fakeRoot) {
|
|
|
- depArchiveInfo = [NSString stringWithFormat:@"%@ %@ -b %@ %@", fakeRoot, dpkg, self.packageName, [self fullPackageName]];
|
|
|
+ depArchiveInfo = [NSString stringWithFormat:@"%@ %@ -b %@ %@", fakeRoot, dpkg, self.packageName, fullName];
|
|
|
}
|
|
|
[[HelperClass returnForProcess:depArchiveInfo] componentsJoinedByString:@"\n"];
|
|
|
DLog(@"\nDone!\n\n");
|
|
@@ -715,9 +726,21 @@
|
|
|
DLog(@"[INFO] moving %@ to %@", oldPath, newPath);
|
|
|
[FM moveItemAtPath:oldPath toPath:newPath error:nil];
|
|
|
}];
|
|
|
- NSString *depArchiveInfo = [NSString stringWithFormat:@"%@ -b %@", dpkg, self.packageName];
|
|
|
+
|
|
|
+ NSString *fullName = [self fullPackageName];
|
|
|
+ if ([FM fileExistsAtPath:fullName]){
|
|
|
+ NSString *overwritePrompt = [NSString stringWithFormat:@"%@ already exists, do you want to overwrite it? [y/n]", fullName];
|
|
|
+ BOOL shouldOverwrite = [HelperClass shouldContinueWithPrompt:overwritePrompt];
|
|
|
+ if (shouldOverwrite) {
|
|
|
+ [FM removeItemAtPath:fullName error:nil];
|
|
|
+ } else {
|
|
|
+ DLog(@"Not overwriting file... bailing out!");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ NSString *depArchiveInfo = [NSString stringWithFormat:@"%@ -b %@ %@", dpkg, self.packageName, fullName];
|
|
|
if (fakeRoot) {
|
|
|
- depArchiveInfo = [NSString stringWithFormat:@"%@ %@ -b %@", fakeRoot, dpkg, self.packageName];
|
|
|
+ depArchiveInfo = [NSString stringWithFormat:@"%@ %@ -b %@ %@", fakeRoot, dpkg, self.packageName, fullName];
|
|
|
}
|
|
|
[[HelperClass returnForProcess:depArchiveInfo] componentsJoinedByString:@"\n"];
|
|
|
DLog(@"\nDone!\n\n");
|