Chromium Code Reviews| Index: chrome/installer/util/lzma_util.cc |
| diff --git a/chrome/installer/util/lzma_util.cc b/chrome/installer/util/lzma_util.cc |
| index 8f36b5fd47f0477b440ca7ddb931fa12f3f50612..3baf02f6af9f3eacfd0e436fac8afcf45d2ad2d9 100644 |
| --- a/chrome/installer/util/lzma_util.cc |
| +++ b/chrome/installer/util/lzma_util.cc |
| @@ -159,22 +159,21 @@ DWORD LzmaUtil::UnPack(const std::wstring& location, |
| } |
| // Append location to the file path in archive, to get full path. |
| - std::wstring wfileName(location); |
| - file_util::AppendToPath(&wfileName, UTF8ToWide(f->Name)); |
| + std::wstring file_name(location); |
|
Evan Martin
2011/01/06 23:39:49
Maybe better to make this a FilePath? Then we cou
tfarina
2011/01/06 23:52:48
Done. PTAL!
|
| + file_util::AppendToPath(&file_name, UTF8ToWide(f->Name)); |
| if (output_file) |
| - *output_file = wfileName; |
| + *output_file = file_name; |
| // If archive entry is directory create it and move on to the next entry. |
| if (f->IsDirectory) { |
| - file_util::CreateDirectory(FilePath(wfileName)); |
| + file_util::CreateDirectory(FilePath(file_name)); |
| continue; |
| } |
| HANDLE hFile; |
| - std::wstring directory = file_util::GetDirectoryFromPath(wfileName); |
| - file_util::CreateDirectory(FilePath(directory)); |
| + file_util::CreateDirectory(FilePath(file_name).DirName()); |
| - hFile = CreateFile(wfileName.c_str(), GENERIC_WRITE, 0, NULL, |
| + hFile = CreateFile(file_name.c_str(), GENERIC_WRITE, 0, NULL, |
| CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL); |
| if (hFile == INVALID_HANDLE_VALUE) { |
| ret = GetLastError(); |