From 5383fbb14c470dcacb3310f4d0c14c98d0ef50ed Mon Sep 17 00:00:00 2001 From: "alecf%netscape.com" Date: Wed, 28 Apr 1999 06:04:40 +0000 Subject: [PATCH] remove SetFilePath so we aren't tempted to set it (it's supposed to be coming directly from the URI) --- mailnews/local/public/nsIMailboxUrl.h | 2 +- mailnews/local/src/nsMailboxUrl.cpp | 7 ++++++- mailnews/local/src/nsMailboxUrl.h | 1 - 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/mailnews/local/public/nsIMailboxUrl.h b/mailnews/local/public/nsIMailboxUrl.h index 1ade99413ea..7406761428b 100644 --- a/mailnews/local/public/nsIMailboxUrl.h +++ b/mailnews/local/public/nsIMailboxUrl.h @@ -84,7 +84,7 @@ public: // Getters and Setters for the mailbox url state /////////////////////////////////////////////////////////////////////////////// NS_IMETHOD GetFilePath(const nsFileSpec ** aFilePath) = 0; - NS_IMETHOD SetFilePath(const nsFileSpec& aFilePath) = 0; + // NS_IMETHOD SetFilePath(const nsFileSpec& aFilePath) = 0; // Some mailbox urls include a message key for the message in question. NS_IMETHOD GetMessageKey(nsMsgKey& aMessageID) = 0; diff --git a/mailnews/local/src/nsMailboxUrl.cpp b/mailnews/local/src/nsMailboxUrl.cpp index beb11485d86..ff58f32ac63 100644 --- a/mailnews/local/src/nsMailboxUrl.cpp +++ b/mailnews/local/src/nsMailboxUrl.cpp @@ -215,6 +215,7 @@ nsresult nsMailboxUrl::GetFilePath(const nsFileSpec ** aFilePath) return NS_OK; } +#if 0 nsresult nsMailboxUrl::SetFilePath(const nsFileSpec& aFilePath) { NS_LOCK_INSTANCE(); @@ -225,6 +226,7 @@ nsresult nsMailboxUrl::SetFilePath(const nsFileSpec& aFilePath) NS_UNLOCK_INSTANCE(); return NS_OK; } +#endif nsresult nsMailboxUrl::GetMessageKey(nsMsgKey& aMessageKey) { @@ -320,7 +322,10 @@ NS_IMETHODIMP nsMailboxUrl::GetURI(char ** aURI) { char * uri = nsnull; nsFileSpec folder = *filePath; - nsBuildLocalMessageURI(folder, m_messageKey, &uri); + nsBuildLocalMessageURI(m_spec, m_messageKey, &uri); +#ifdef DEBUG_alecf + fprintf(stderr, "nsBuildLocalMessageURI(%s, %d -> %s) in nsMailboxUrl::GetURI", m_spec, m_messageKey, uri); +#endif *aURI = uri; } else diff --git a/mailnews/local/src/nsMailboxUrl.h b/mailnews/local/src/nsMailboxUrl.h index 012df1da56c..5258c4b3c54 100644 --- a/mailnews/local/src/nsMailboxUrl.h +++ b/mailnews/local/src/nsMailboxUrl.h @@ -69,7 +69,6 @@ public: NS_IMETHOD SetMailboxCopyHandler(nsIStreamListener * aConsumer); NS_IMETHOD GetMailboxCopyHandler(nsIStreamListener ** aConsumer); - NS_IMETHOD SetFilePath(const nsFileSpec& aFilePath); NS_IMETHOD GetFilePath(const nsFileSpec ** aFilePath); NS_IMETHOD GetMessageKey(nsMsgKey& aMessageKey); NS_IMETHOD SetMessageSize(PRUint32 aMessageSize);