      // or if the update's application version is less than the current
      // application version.
      if (!GetVersionFile(updatesDir, versionFile) ||
-@@ -932,16 +920,31 @@ nsUpdateProcessor::ProcessUpdate(nsIUpda
-     argc = 1;
-     nsCOMPtr<nsIFile> binary;
-     rv = ds->Get(XRE_EXECUTABLE_FILE, NS_GET_IID(nsIFile),
-                  getter_AddRefs(binary));
-     NS_ASSERTION(NS_SUCCEEDED(rv), "Can't get the binary path");
-     binary->GetNativePath(binPath);
-   }
- 
-+  // Updating JonDoBrowser means having a different update root.
-+#if defined(XP_MACOSX)
-+  // XXX: Not implemented yet.
-+#else
-+  // XXX: Only Linux currently.
-+  nsCOMPtr<nsIFile> parentDir1, parentDir2;
-+  nsresult rv = updRoot->GetParent(getter_AddRefs(parentDir1));
-+  if (NS_FAILED(rv))
-+    printf("We did not get the parent dir!\n");
-+  rv = parentDir1->GetParent(getter_AddRefs(parentDir2));
-+  if (NS_FAILED(rv))
-+    printf("We did not get the grandparent dir!\n");
-+  updRoot = parentDir2;
-+#endif  
-+
-   // Copy the parameters to the BackgroundUpdateInfo structure shared with the
-   // watcher thread.
-   mInfo.mGREDir = greDir;
-   mInfo.mAppDir = appDir;
-   mInfo.mUpdateRoot = updRoot;
-   mInfo.mArgc = argc;
-   mInfo.mArgv = new char*[argc];
-   if (dirProvider) {
-@@ -952,29 +955,34 @@ nsUpdateProcessor::ProcessUpdate(nsIUpda
+         IsOlderVersion(versionFile, appVersion)) {
++      printf("remove, remove");
+       updatesDir->Remove(true);
+     } else {
++      printf("apply, apply");
+       ApplyUpdate(greDir, updatesDir, statusFile,
+                   appDir, argc, argv, restart, pid);
+     }
+     break;
+   }
+   case eAppliedUpdate:
+   case eAppliedService:
+     // An update was applied in the background, so we need to switch to using
+@@ -952,29 +942,34 @@ nsUpdateProcessor::ProcessUpdate(nsIUpda
      }
    } else {
      MOZ_ASSERT(argc == 1); // see above

+pref("jondobrowser.version", "0.5");
diff -r e3e008015298 browser/base/content/aboutDialog.js
--- a/browser/base/content/aboutDialog.js	Wed Jan 23 11:46:06 2013 -0800
+++ b/browser/base/content/aboutDialog.js	Mon Feb 11 15:45:27 2013 +0100
@@ -304,17 +304,16 @@ appUpdater.prototype =
         gAppUpdater.selectPanel("noUpdatesFound");
         return;

     LOG("Checker:getUpdateURL - update URL: " + url);
     return url;
   },
@@ -3265,17 +3101,17 @@ Downloader.prototype = {
         // We only need to explicitly show the prompt if this is a background
         // download, since otherwise some kind of UI is already visible and
         // that UI will notify.
         if (this.background)
           shouldShowPrompt = !getPref("getBoolPref", PREF_APP_UPDATE_STAGE_ENABLED, false);
 
         // Tell the updater.exe we're ready to apply.
         writeStatusFile(getUpdatesDir(), state);
-        writeVersionFile(getUpdatesDir(), this._update.appVersion);
+        writeVersionFile(getUpdatesDir(), this._update.platformVersion);
         this._update.installDate = (new Date()).getTime();
         this._update.statusText = gUpdateBundle.GetStringFromName("installPending");
       }
       else {
         LOG("Downloader:onStopRequest - download verification failed");
         state = STATE_DOWNLOAD_FAILED;
 
         // TODO: use more informative error code here
diff -r e3e008015298 toolkit/xre/nsUpdateDriver.cpp
--- a/toolkit/xre/nsUpdateDriver.cpp	Wed Jan 23 11:46:06 2013 -0800
+++ b/toolkit/xre/nsUpdateDriver.cpp	Tue Feb 12 07:50:01 2013 +0100
@@ -608,58 +608,43 @@ ApplyUpdate(nsIFile *greDir, nsIFile *up
   
   nsCAutoString updaterPath;
