aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog7
-rw-r--r--embed/mozilla/mozilla-embed-persist.cpp15
2 files changed, 15 insertions, 7 deletions
diff --git a/ChangeLog b/ChangeLog
index 7d33761bd..69f6de44d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
2003-08-20 Marco Pesenti Gritti <marco@gnome.org>
+ * embed/mozilla/mozilla-embed-persist.cpp:
+
+ Overwrite existing files. (We already warn the user
+ about it).
+
+2003-08-20 Marco Pesenti Gritti <marco@gnome.org>
+
* lib/widgets/ephy-node-view.c: (get_node_from_path),
(gtk_tree_view_vertical_autoscroll), (scroll_timeout),
(remove_scroll_timeout), (set_drag_dest_row),
diff --git a/embed/mozilla/mozilla-embed-persist.cpp b/embed/mozilla/mozilla-embed-persist.cpp
index 2b50259f9..0161086cb 100644
--- a/embed/mozilla/mozilla-embed-persist.cpp
+++ b/embed/mozilla/mozilla-embed-persist.cpp
@@ -156,6 +156,7 @@ impl_save (EphyEmbedPersist *persist)
EphyEmbed *embed;
EmbedPersistFlags flags;
EphyWrapper *wrapper = NULL;
+ PRUint32 persistFlags = 0;
g_object_ref (persist);
@@ -209,27 +210,27 @@ impl_save (EphyEmbedPersist *persist)
wrapper->GetDOMWindow (getter_AddRefs (parent));
}
+ persistFlags = nsIWebBrowserPersist::PERSIST_FLAGS_REPLACE_EXISTING_FILES;
+
size_t len = strlen(filename);
if((filename[len-1] == 'z' && filename[len-2] == 'g') ||
(filename[len-1] == 'Z' && filename[len-2] == 'G'))
{
- bpersist->SetPersistFlags (nsIWebBrowserPersist::PERSIST_FLAGS_NO_CONVERSION);
- }
- else
- {
- bpersist->SetPersistFlags (nsIWebBrowserPersist::PERSIST_FLAGS_NONE);
+ persistFlags |= nsIWebBrowserPersist::PERSIST_FLAGS_NO_CONVERSION;
}
if (flags & EMBED_PERSIST_BYPASSCACHE)
{
- bpersist->SetPersistFlags (nsIWebBrowserPersist::PERSIST_FLAGS_BYPASS_CACHE);
+ persistFlags |= nsIWebBrowserPersist::PERSIST_FLAGS_BYPASS_CACHE;
}
if (flags & EMBED_PERSIST_FROMCACHE)
{
- bpersist->SetPersistFlags (nsIWebBrowserPersist::PERSIST_FLAGS_FROM_CACHE);
+ persistFlags |= nsIWebBrowserPersist::PERSIST_FLAGS_FROM_CACHE;
}
+ bpersist->SetPersistFlags (persistFlags);
+
GProgressListener *aProgress = new GProgressListener ();
MOZILLA_EMBED_PERSIST (persist)->priv->mProgress = aProgress;