Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Clean up after install on quit updates

  • Loading branch information...
commit 6be55685c885ff38f9f779d4515472bd315d8fe8 1 parent 449b00e
@mattstevens authored
Showing with 13 additions and 12 deletions.
  1. +13 −12 finish_installation.m
View
25 finish_installation.m
@@ -117,19 +117,20 @@ - (void) relaunch
else
appPath = [host installationPath];
[[NSWorkspace sharedWorkspace] openFile: appPath];
- if( folderpath )
- {
- NSError* theError = nil;
- if( ![SUPlainInstaller _removeFileAtPath: [SUInstaller updateFolder] error: &theError] )
- SULog( @"Couldn't remove update folder: %@.", theError );
- }
- #if MAC_OS_X_VERSION_MIN_REQUIRED <= MAC_OS_X_VERSION_10_4
- [[NSFileManager defaultManager] removeFileAtPath: selfPath handler: nil];
- #else
- [[NSFileManager defaultManager] removeItemAtPath: selfPath error: NULL];
- #endif
}
-
+
+ if (folderpath)
+ {
+ NSError *theError = nil;
+ if( ![SUPlainInstaller _removeFileAtPath: [SUInstaller updateFolder] error: &theError] )
+ SULog( @"Couldn't remove update folder: %@.", theError );
+ }
+#if MAC_OS_X_VERSION_MIN_REQUIRED <= MAC_OS_X_VERSION_10_4
+ [[NSFileManager defaultManager] removeFileAtPath: selfPath handler: nil];
+#else
+ [[NSFileManager defaultManager] removeItemAtPath: selfPath error: NULL];
+#endif
+
exit(EXIT_SUCCESS);
}
Please sign in to comment.
Something went wrong with that request. Please try again.