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

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

Issue 6111003: Use FilePath::DirName instead of the deprecated file_util::GetDirectoryFromPath. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: review2 Created 9 years, 11 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/browser/ui/views/shell_dialogs_win.cc ('k') | chrome/installer/util/shell_util.cc » ('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 8f36b5fd47f0477b440ca7ddb931fa12f3f50612..b80fdd915d268d0056280cb52046d146ebc67824 100644
--- a/chrome/installer/util/lzma_util.cc
+++ b/chrome/installer/util/lzma_util.cc
@@ -158,23 +158,20 @@ DWORD LzmaUtil::UnPack(const std::wstring& location,
break;
}
- // Append location to the file path in archive, to get full path.
- std::wstring wfileName(location);
- file_util::AppendToPath(&wfileName, UTF8ToWide(f->Name));
+ FilePath file_path = FilePath(location).Append(UTF8ToWide(f->Name));
if (output_file)
- *output_file = wfileName;
+ *output_file = file_path.value();
// 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(file_path);
continue;
}
- HANDLE hFile;
- std::wstring directory = file_util::GetDirectoryFromPath(wfileName);
- file_util::CreateDirectory(FilePath(directory));
+ file_util::CreateDirectory(file_path.DirName());
- hFile = CreateFile(wfileName.c_str(), GENERIC_WRITE, 0, NULL,
+ HANDLE hFile;
+ hFile = CreateFile(file_path.value().c_str(), GENERIC_WRITE, 0, NULL,
CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
if (hFile == INVALID_HANDLE_VALUE) {
ret = GetLastError();
« no previous file with comments | « chrome/browser/ui/views/shell_dialogs_win.cc ('k') | chrome/installer/util/shell_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698