aboutsummaryrefslogtreecommitdiffstats
path: root/embed
diff options
context:
space:
mode:
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;