diff options
author | Christian Persch <chpe@cvs.gnome.org> | 2005-05-04 18:26:33 +0800 |
---|---|---|
committer | Christian Persch <chpe@src.gnome.org> | 2005-05-04 18:26:33 +0800 |
commit | 48c16a1a940cef847a0a13cdee05af161aab779b (patch) | |
tree | b3f80ecdbac9f1b42d28fc4241e165c79c52b205 /embed | |
parent | 954cb894311967a218ae96b759c00d1a9e120661 (diff) | |
download | gsoc2013-epiphany-48c16a1a940cef847a0a13cdee05af161aab779b.tar gsoc2013-epiphany-48c16a1a940cef847a0a13cdee05af161aab779b.tar.gz gsoc2013-epiphany-48c16a1a940cef847a0a13cdee05af161aab779b.tar.bz2 gsoc2013-epiphany-48c16a1a940cef847a0a13cdee05af161aab779b.tar.lz gsoc2013-epiphany-48c16a1a940cef847a0a13cdee05af161aab779b.tar.xz gsoc2013-epiphany-48c16a1a940cef847a0a13cdee05af161aab779b.tar.zst gsoc2013-epiphany-48c16a1a940cef847a0a13cdee05af161aab779b.zip |
Fix the build from the last commit.
2005-05-04 Christian Persch <chpe@cvs.gnome.org>
* embed/mozilla/mozilla-embed-persist.cpp:
Fix the build from the last commit.
Diffstat (limited to 'embed')
-rw-r--r-- | embed/mozilla/mozilla-embed-persist.cpp | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/embed/mozilla/mozilla-embed-persist.cpp b/embed/mozilla/mozilla-embed-persist.cpp index 404a0debf..b9f3e690c 100644 --- a/embed/mozilla/mozilla-embed-persist.cpp +++ b/embed/mozilla/mozilla-embed-persist.cpp @@ -183,20 +183,18 @@ impl_save (EphyEmbedPersist *persist) /* Get the uri to save to */ nsCOMPtr<nsIURI> inURI; - nsEmbedCString sURI; if (uri) { - sURI.Assign (uri); + /* FIXME: origin charset!! */ + rv = EphyUtils::NewURI (getter_AddRefs(inURI), nsEmbedCString(uri)); + NS_ENSURE_SUCCESS (rv, FALSE); } else { - rv = browser->GetDocumentUrl (sURI); + rv = browser->GetDocumentURI (getter_AddRefs (inURI)); NS_ENSURE_SUCCESS (rv, FALSE); } - rv = EphyUtils::NewURI (getter_AddRefs(inURI), sURI); - NS_ENSURE_SUCCESS (rv, FALSE); - /* Get post data */ nsCOMPtr<nsIInputStream> postData; if (browser) @@ -245,7 +243,7 @@ impl_save (EphyEmbedPersist *persist) */ NS_ENSURE_TRUE (!(flags & EPHY_EMBED_PERSIST_COPY_PAGE) || pageDescriptor, FALSE); - if (filename == NULL) + if (filename == NULL || filename[0] == '\0') { /* Create an header sniffer and do the save */ nsCOMPtr<nsIWebBrowserPersist> webPersist = |