aboutsummaryrefslogtreecommitdiffstats
path: root/embed
diff options
context:
space:
mode:
authorMarco Pesenti Gritti <marco@gnome.org>2003-08-21 01:45:42 +0800
committerMarco Pesenti Gritti <marco@src.gnome.org>2003-08-21 01:45:42 +0800
commit849dc41ba0f43ff69a8e16d995797444009f347c (patch)
tree2f635c5e03df4bc82163f41507367babe0d4d744 /embed
parent8c41e7c087541dd806765c9720cfac3a091483c7 (diff)
downloadgsoc2013-epiphany-849dc41ba0f43ff69a8e16d995797444009f347c.tar
gsoc2013-epiphany-849dc41ba0f43ff69a8e16d995797444009f347c.tar.gz
gsoc2013-epiphany-849dc41ba0f43ff69a8e16d995797444009f347c.tar.bz2
gsoc2013-epiphany-849dc41ba0f43ff69a8e16d995797444009f347c.tar.lz
gsoc2013-epiphany-849dc41ba0f43ff69a8e16d995797444009f347c.tar.xz
gsoc2013-epiphany-849dc41ba0f43ff69a8e16d995797444009f347c.tar.zst
gsoc2013-epiphany-849dc41ba0f43ff69a8e16d995797444009f347c.zip
Overwrite existing files. (We already warn the user about it).
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).
Diffstat (limited to 'embed')
-rw-r--r--embed/mozilla/mozilla-embed-persist.cpp15
1 files changed, 8 insertions, 7 deletions
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;