Bug 994834 - Remove app package on uninstall. r=felipe
authorMarco Castelluccio <mar.castelluccio@studenti.unina.it>
Sun, 13 Apr 2014 15:41:07 -0400
changeset 196788 dd79dc4f978ceac242f4a10ec68b9a6c07fa6781
parent 196787 261fbd3fd655782abe2a72c8e7ab5ba482dfcaa8
child 196789 d0874032eebac33f4e495cec2da7ed60ed08fe39
push id3624
push userasasaki@mozilla.com
push dateMon, 09 Jun 2014 21:49:01 +0000
treeherdermozilla-beta@b1a5da15899a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersfelipe
bugs994834
milestone31.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 994834 - Remove app package on uninstall. r=felipe
webapprt/gtk2/webapprt.cpp
--- a/webapprt/gtk2/webapprt.cpp
+++ b/webapprt/gtk2/webapprt.cpp
@@ -18,16 +18,17 @@
 #include "nsXPCOMGlue.h"
 #include "nsXPCOMPrivate.h"              // for MAXPATHLEN and XPCOM_DLL
 #include "nsXULAppAPI.h"
 #include "BinaryPath.h"
 
 const char kAPP_INI[] = "application.ini";
 const char kWEBAPP_INI[] = "webapp.ini";
 const char kWEBAPP_JSON[] = "webapp.json";
+const char kWEBAPP_PACKAGE[] = "application.zip";
 const char kWEBAPPRT_INI[] = "webapprt.ini";
 const char kWEBAPPRT_PATH[] = "webapprt";
 const char kAPP_ENV_VAR[] = "XUL_APP_FILE";
 const char kAPP_RT[] = "webapprt-stub";
 
 int* pargc;
 char*** pargv;
 char profile[MAXPATHLEN];
@@ -259,16 +260,20 @@ void RemoveApplication(nsINIParser& pars
   char webAppJsonPath[MAXPATHLEN];
   snprintf(webAppJsonPath, MAXPATHLEN, "%s/%s", curExeDir, kWEBAPP_JSON);
   unlink(webAppJsonPath);
 
   char iconPath[MAXPATHLEN];
   snprintf(iconPath, MAXPATHLEN, "%s/icon.png", curExeDir);
   unlink(iconPath);
 
+  char packagePath[MAXPATHLEN];
+  snprintf(packagePath, MAXPATHLEN, "%s/%s", curExeDir, kWEBAPP_PACKAGE);
+  unlink(packagePath);
+
   char appName[MAXPATHLEN];
   if (NS_FAILED(parser.GetString("Webapp", "Name", appName, MAXPATHLEN))) {
     strcpy(appName, profile);
   }
 
   char uninstallMsg[MAXPATHLEN];
   if (NS_SUCCEEDED(parser.GetString("Webapp", "UninstallMsg", uninstallMsg, MAXPATHLEN))) {
     /**