Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(7695)

Unified Diff: chrome/installer/mini_installer/mini_installer.cc

Issue 6693015: Switch out the setup api for using the cabinet API directly.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/installer/mini_installer/mini_installer.cc
===================================================================
--- chrome/installer/mini_installer/mini_installer.cc (revision 78171)
+++ chrome/installer/mini_installer/mini_installer.cc (working copy)
@@ -34,6 +34,7 @@
#include <shlwapi.h>
#include "chrome/installer/mini_installer/appid.h"
+#include "chrome/installer/mini_installer/decompress.h"
#include "chrome/installer/mini_installer/mini_installer.h"
#include "chrome/installer/mini_installer/pe_resource.h"
@@ -508,19 +509,17 @@
if (::lstrlen(setup_path) > 0) {
// Uncompress LZ compressed resource. Setup is packed with 'MSCF'
- // as opposed to old DOS way of 'SZDD'. Hence use SetupInstallFile
- // instead of LZCopy.
- // Note that the API will automatically delete the original file
- // if the extraction was successful.
- if (!SetupInstallFile(NULL, NULL, setup_path, NULL, setup_dest_path,
- SP_COPY_DELETESOURCE | SP_COPY_SOURCE_ABSOLUTE,
- NULL, NULL))
- return false;
+ // as opposed to old DOS way of 'SZDD'. Hence we don't use LZCopy.
+ bool success = mini_installer::Expand(setup_path, setup_dest_path);
+ DeleteFile(setup_path);
+ if (success) {
+ if (!SafeStrCopy(setup_path, setup_path_size, setup_dest_path)) {
+ ::DeleteFile(setup_dest_path);
+ success = false;
+ }
+ }
- if (!SafeStrCopy(setup_path, setup_path_size, setup_dest_path))
- return false;
-
- return true;
+ return success;
}
// setup.exe still not found. So finally check is it was sent as 'BN'

Powered by Google App Engine
This is Rietveld 408576698