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

Unified Diff: chrome/installer/util/lzma_util.cc

Issue 1700453002: Update lzma_sdk sources to 15.14. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Chromium modifications Created 4 years, 10 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
« no previous file with comments | « chrome/installer/util/lzma_file_allocator.h ('k') | third_party/lzma_sdk/7z.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/installer/util/lzma_util.cc
diff --git a/chrome/installer/util/lzma_util.cc b/chrome/installer/util/lzma_util.cc
index fa5d21f1b3dc842775863598ea3501fe1d61ea0b..2da7b91c0192d3910abc4f17de2ded18de49f29a 100644
--- a/chrome/installer/util/lzma_util.cc
+++ b/chrome/installer/util/lzma_util.cc
@@ -163,11 +163,10 @@ DWORD LzmaUtil::UnPack(const std::wstring& location,
// Extra parentheses are needed here to avoid the most vexing parse.
LzmaFileAllocator fileAllocator((base::FilePath(location)));
- for (unsigned int i = 0; i < db.db.NumFiles; i++) {
+ for (unsigned int i = 0; i < db.NumFiles; i++) {
DWORD written;
size_t offset;
size_t outSizeProcessed;
- CSzFileItem *f = db.db.Files + i;
if ((ret = SzArEx_Extract(&db, &lookStream.s, i, &blockIndex, &outBuffer,
&outBufferSize, &offset, &outSizeProcessed,
@@ -194,7 +193,7 @@ DWORD LzmaUtil::UnPack(const std::wstring& location,
*output_file = file_path.value();
// If archive entry is directory create it and move on to the next entry.
- if (f->IsDir) {
+ if (SzArEx_IsDir(&db, i)) {
CreateDirectory(file_path);
continue;
}
@@ -219,9 +218,9 @@ DWORD LzmaUtil::UnPack(const std::wstring& location,
break;
}
- if (f->MTimeDefined) {
+ if (SzBitWithVals_Check(&db.MTime, i)) {
if (!SetFileTime(hFile, NULL, NULL,
- (const FILETIME *)&(f->MTime))) {
+ (const FILETIME *) (&db.MTime.Vals[i]))) {
ret = GetLastError();
CloseHandle(hFile);
LOG(ERROR) << L"Error returned by SetFileTime: " << ret;
« no previous file with comments | « chrome/installer/util/lzma_file_allocator.h ('k') | third_party/lzma_sdk/7z.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698