aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--embed/mozilla/mozilla-embed-persist.cpp12
2 files changed, 11 insertions, 7 deletions
diff --git a/ChangeLog b/ChangeLog
index 9b7ee4ae3..a52b0d32b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2005-05-04 Christian Persch <chpe@cvs.gnome.org>
+
+ * embed/mozilla/mozilla-embed-persist.cpp:
+
+ Fix the build from the last commit.
+
2005-05-03 Christian Persch <chpe@cvs.gnome.org>
* embed/mozilla/EphyBrowser.cpp:
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 =