mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-29 07:42:04 +00:00
fix for #6790. a=chofmann, r=mscott.
This commit is contained in:
parent
2407e3e47f
commit
559cf545bd
@ -2041,23 +2041,19 @@ PRInt32 nsNNTPProtocol::ReadArticle(nsIInputStream * inputStream, PRUint32 lengt
|
||||
if (m_tempArticleFile)
|
||||
PR_Close(m_tempArticleFile);
|
||||
|
||||
// mscott: hack alert...now that the file is done...turn around and fire a file url
|
||||
// to display the message....
|
||||
char * fileUrl = PR_smprintf("file:///%s", ARTICLE_PATH_URL);
|
||||
if (m_displayConsumer)
|
||||
{
|
||||
nsIURL * url = nsnull;
|
||||
rv = NS_NewURL(&url, fileUrl, nsnull, nsnull, nsnull);
|
||||
if (url)
|
||||
{
|
||||
// to load the webshell!
|
||||
// mWebShell->LoadURL(nsAutoString("http://www.netscape.com"),
|
||||
// nsnull, PR_TRUE, nsURLReload, 0);
|
||||
m_displayConsumer->LoadURL(nsAutoString(fileUrl).GetUnicode(), nsnull, PR_TRUE, nsURLReload, 0);
|
||||
nsFilePath filePath(ARTICLE_PATH);
|
||||
nsFileURL fileURL(filePath);
|
||||
char * article_path_url = PL_strdup(fileURL.GetAsString());
|
||||
|
||||
}
|
||||
#ifdef DEBUG_sspitzer
|
||||
printf("load this url to display the message: %s\n", article_path_url);
|
||||
#endif
|
||||
|
||||
// mscott: we may need to release our reference on the url....
|
||||
m_displayConsumer->LoadURL(nsAutoString(article_path_url).GetUnicode(), nsnull, PR_TRUE, nsURLReload, 0);
|
||||
|
||||
PR_FREEIF(article_path_url);
|
||||
}
|
||||
|
||||
ClearFlag(NNTP_PAUSE_FOR_READ);
|
||||
|
@ -42,18 +42,14 @@
|
||||
|
||||
#ifdef XP_UNIX
|
||||
#define ARTICLE_PATH "/usr/tmp/tempArticle.eml"
|
||||
#define ARTICLE_PATH_URL ARTICLE_PATH
|
||||
#endif
|
||||
|
||||
#ifdef XP_PC
|
||||
#define ARTICLE_PATH "c:\\temp\\tempArticle.eml"
|
||||
#define ARTICLE_PATH_URL "C|/temp/tempArticle.eml"
|
||||
#endif
|
||||
|
||||
#ifdef XP_MAC
|
||||
#define ARTICLE_PATH "tempArticle.eml"
|
||||
// this isn't correct, but will do for now
|
||||
#define ARTICLE_PATH_URL ARTICLE_PATH
|
||||
#define ARTICLE_PATH "tempArticle.eml"
|
||||
#endif
|
||||
|
||||
// State Flags (Note, I use the word state in terms of storing
|
||||
|
Loading…
Reference in New Issue
Block a user