merge backout
authorRobert Kaiser <kairo@kairo.at>
Mon, 18 Aug 2008 17:11:59 +0200
changeset 133 477d7ede8e4015ed8d4535c31fbe4e8a0882e585
parent 132 a0e1e5b5a20d85b28a2f9505197fcaee2c1d127f (current diff)
parent 130 d4c1ad6539682e68d4d4c6b281660b00fbfca613 (diff)
child 134 21dd206080e0cef10045ac0acf8cb2f51b82016c
push idunknown
push userunknown
push dateunknown
merge backout
--- a/mailnews/imap/src/nsImapUrl.cpp
+++ b/mailnews/imap/src/nsImapUrl.cpp
@@ -1176,16 +1176,29 @@ NS_IMETHODIMP nsImapUrl::SetMockChannel(
 
 NS_IMETHODIMP nsImapUrl::GetAllowContentChange(PRBool *result)
 {
   NS_ENSURE_ARG_POINTER(result);
   *result = m_allowContentChange;
   return NS_OK;
 }
 
+NS_IMETHODIMP nsImapUrl::Clone(nsIURI **_retval)
+{
+  nsresult rv = nsMsgMailNewsUrl::Clone(_retval);
+  NS_ENSURE_SUCCESS(rv, rv);
+  // also clone the mURI member, because GetUri below won't work if
+  // mURI isn't set due to escaping issues.
+  nsCOMPtr <nsIMsgMessageUrl> clonedUrl = do_QueryInterface(*_retval);
+  if (clonedUrl)
+    clonedUrl->SetUri(mURI.get());
+  return rv;
+}
+
+
 NS_IMETHODIMP nsImapUrl::SetUri(const char * aURI)
 {
   mURI= aURI;
   return NS_OK;
 }
 
 NS_IMETHODIMP nsImapUrl::GetUri(char** aURI)
 {
--- a/mailnews/imap/src/nsImapUrl.h
+++ b/mailnews/imap/src/nsImapUrl.h
@@ -54,16 +54,17 @@ class nsImapUrl : public nsIImapUrl, pub
 {
 public:
 
   NS_DECL_ISUPPORTS_INHERITED
 
   // nsIURI override
   NS_IMETHOD SetSpec(const nsACString &aSpec);
   NS_IMETHOD SetQuery(const nsACString &aQuery);
+  NS_IMETHOD Clone(nsIURI **_retval);
 
   //////////////////////////////////////////////////////////////////////////////
   // we support the nsIImapUrl interface
   //////////////////////////////////////////////////////////////////////////////
   NS_DECL_NSIIMAPURL
 
   // nsIMsgMailNewsUrl overrides
   NS_IMETHOD IsUrlType(PRUint32 type, PRBool *isType);