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

Unified Diff: webkit/glue/dom_serializer.cc

Issue 27106: Get save page working on posix. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 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/browser/download/save_package.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/glue/dom_serializer.cc
===================================================================
--- webkit/glue/dom_serializer.cc (revision 10273)
+++ webkit/glue/dom_serializer.cc (working copy)
@@ -380,8 +380,11 @@
LinkLocalPathMap::const_iterator it = local_links_.find(value);
if (it != local_links_.end()) {
// Replace the link when we have local files.
- result += FilePathStringToString(param->directory_name.value());
- result += FilePathStringToString(it->second.value());
+ FilePath::StringType path(FilePath::kCurrentDirectory);
+ if (!param->directory_name.empty())
+ path += FILE_PATH_LITERAL("/") + param->directory_name.value();
+ path += FILE_PATH_LITERAL("/") + it->second.value();
+ result += FilePathStringToString(path);
} else {
// If not found local path, replace it with absolute link.
result += str_value;
@@ -577,7 +580,7 @@
current_doc,
current_frame_gurl == main_page_gurl ?
local_directory_name_ :
- FilePath(FilePath::kCurrentDirectory));
+ FilePath());
// Process current document.
WebCore::Element* root_element = current_doc->documentElement();
« no previous file with comments | « chrome/browser/download/save_package.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698