summaryrefslogtreecommitdiffstats
path: root/net/tools
diff options
context:
space:
mode:
authormbelshe@google.com <mbelshe@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-27 16:26:46 +0000
committermbelshe@google.com <mbelshe@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-27 16:26:46 +0000
commit86a4e23c780d6035a5488155edb1be8715d6e50b (patch)
treea47946c0397a39afbfee5c221ce835431adfeecf /net/tools
parent1e7fafc43baf4b1f1bab51c5514e035058f84172 (diff)
downloadchromium_src-86a4e23c780d6035a5488155edb1be8715d6e50b.zip
chromium_src-86a4e23c780d6035a5488155edb1be8715d6e50b.tar.gz
chromium_src-86a4e23c780d6035a5488155edb1be8715d6e50b.tar.bz2
FilePath::Append() doesn't allow you to append a fully-qualified
path (like "C:\foo\bar"). The current code was attempting to append "c:\foo\bar" to "\\?\" for long filename support. Reworked so that this could work. I feel back about using the ToWStringHack() function, but there is literally no other choice. BUG=none TEST=none Review URL: http://codereview.chromium.org/337033 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30206 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/tools')
-rw-r--r--net/tools/dump_cache/cache_dumper.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/net/tools/dump_cache/cache_dumper.cc b/net/tools/dump_cache/cache_dumper.cc
index 6232d55..1120817 100644
--- a/net/tools/dump_cache/cache_dumper.cc
+++ b/net/tools/dump_cache/cache_dumper.cc
@@ -70,7 +70,11 @@ bool DiskDumper::CreateEntry(const std::string& key,
// In order for long filenames to work, we'll need to prepend
// the windows magic token.
const std::wstring kLongFilenamePrefix(L"\\\\?\\");
- entry_path_ = FilePath(kLongFilenamePrefix).Append(entry_path_);
+ // There is no way to prepend to a filename. We simply *have*
+ // to convert to a wstring to do this.
+ std::wstring name = kLongFilenamePrefix;
+ name.append(entry_path_.ToWStringHack());
+ entry_path_ = FilePath(name);
#endif
entry_url_ = key;