Bug 840195 - Update fails if FF is installed in a non-default install path. r=rstrong
authorBrian R. Bondy <netzen@gmail.com>
Wed, 13 Feb 2013 09:23:22 -0500
changeset 121744 744fb922a42e2ffe63c070f81529264502341a0e
parent 121743 212a864f19a21a0305ac1ef7753ae94f175f7636
child 121745 696dc68a45e7b3e064778bb47bfcbef8241eea4e
push id24307
push useremorley@mozilla.com
push dateThu, 14 Feb 2013 10:47:46 +0000
treeherdermozilla-central@aceeea086ccb [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersrstrong
bugs840195
milestone21.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 840195 - Update fails if FF is installed in a non-default install path. r=rstrong
toolkit/xre/nsXREDirProvider.cpp
--- a/toolkit/xre/nsXREDirProvider.cpp
+++ b/toolkit/xre/nsXREDirProvider.cpp
@@ -988,19 +988,16 @@ nsXREDirProvider::GetUpdateRootDir(nsIFi
   // folder virtualization mess on Windows Vista
   nsAutoString programFiles;
   rv = GetShellFolderPath(CSIDL_PROGRAM_FILES, programFiles);
   NS_ENSURE_SUCCESS(rv, rv);
 
   programFiles.AppendLiteral("\\");
   uint32_t programFilesLen = programFiles.Length();
 
-  if (longPath.Length() < programFilesLen)
-    return NS_ERROR_FAILURE;
-
   nsAutoString programName;
   if (_wcsnicmp(programFiles.get(), longPath.get(), programFilesLen) == 0) {
     programName = Substring(longPath, programFilesLen);
   } else {
     // We need the update root directory to live outside of the installation
     // directory, because otherwise the updater writing the log file can cause
     // the directory to be locked, which prevents it from being replaced after
     // background updates.