Bug 616765 - Useless Exists check in nsUpdateDriver.cpp. r=dtownsend, a=approval2.0
authorRobert Strong <robert.bugzilla@gmail.com>
Tue, 07 Dec 2010 12:06:05 -0800
changeset 58790 12bc6188524ca7aaeb176fd4f403ee1242cc705c
parent 58789 37f3097fe17c169e71b97b574cd48a948f72a851
child 58791 dbb99009d49e0550ae6c04eae3cb041f7a1ad667
push id17428
push userrstrong@mozilla.com
push dateTue, 07 Dec 2010 20:06:48 +0000
treeherdermozilla-central@dbb99009d49e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdtownsend, approval2.0
bugs616765
milestone2.0b8pre
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 616765 - Useless Exists check in nsUpdateDriver.cpp. r=dtownsend, a=approval2.0
toolkit/xre/nsUpdateDriver.cpp
--- a/toolkit/xre/nsUpdateDriver.cpp
+++ b/toolkit/xre/nsUpdateDriver.cpp
@@ -497,29 +497,25 @@ ProcessUpdates(nsIFile *greDir, nsIFile 
                int argc, char **argv, const char *&appVersion)
 {
   nsresult rv;
 
   nsCOMPtr<nsIFile> updatesDir;
   rv = updRootDir->Clone(getter_AddRefs(updatesDir));
   if (NS_FAILED(rv))
     return rv;
+
   rv = updatesDir->AppendNative(NS_LITERAL_CSTRING("updates"));
   if (NS_FAILED(rv))
     return rv;
 
   rv = updatesDir->AppendNative(NS_LITERAL_CSTRING("0"));
   if (NS_FAILED(rv))
     return rv;
 
-  PRBool exists;
-  rv = updatesDir->Exists(&exists);
-  if (NS_FAILED(rv) || !exists)
-    return rv;
-
   nsCOMPtr<nsILocalFile> statusFile;
   if (GetStatusFile(updatesDir, statusFile) && IsPending(statusFile)) {
     nsCOMPtr<nsILocalFile> versionFile;
     // Remove the update if the update application version file doesn't exist
     // or if the update's application version is less than the current
     // application version.
     if (!GetVersionFile(updatesDir, versionFile) ||
         IsOlderVersion(versionFile, appVersion)) {