part of Messenger Mac Landing, modifications affect only Mac build.

This commit is contained in:
ducarroz%netscape.com 1999-04-06 00:40:57 +00:00
parent 91118ec325
commit 8876e69d85
4 changed files with 19 additions and 0 deletions

Binary file not shown.

View File

@ -250,8 +250,12 @@ nsMsgLocalMailFolder::AddDirectorySeparator(nsFileSpec &path)
// unfortunately we can't just say:
// path += sep;
// here because of the way nsFileSpec concatenates
#if defined(XP_MAC)
nsAutoString str((nsFilePath)path); //ducarroz: please don't cast a nsFilePath to char* on Mac
#else
const char *chpath = path;
nsAutoString str(chpath);
#endif
str += sep;
path = str;
}
@ -376,8 +380,15 @@ NS_IMETHODIMP nsMsgLocalMailFolder::BuildFolderURL(char **url)
nsFileSpec path;
nsresult rv = GetPath(path);
if (NS_FAILED(rv)) return rv;
#if defined(XP_MAC)
nsAutoString tmpPath((nsFilePath)path); //ducarroz: please don't cast a nsFilePath to char* on Mac
const char *pathName = tmpPath.ToNewCString();
*url = PR_smprintf("%s%s", urlScheme, pathName);
delete [] pathName;
#else
const char *pathName = path;
*url = PR_smprintf("%s%s", urlScheme, pathName);
#endif
return NS_OK;
}

View File

@ -39,6 +39,11 @@
#define MESSAGE_PATH_URL "/C|/temp/tempMessage.eml"
#endif
#ifdef XP_MAC
#define MESSAGE_PATH "tempMessage.eml"
#define MESSAGE_PATH_URL "tempMessage.eml"
#endif
// State Flags (Note, I use the word state in terms of storing
// state information about the connection (authentication, have we sent
// commands, etc. I do not intend it to refer to protocol state)

View File

@ -26,6 +26,9 @@
#include "nsParseMailbox.h"
#ifdef XP_MAC
/* ducarroz: we should solve this redefinition problem! */
# undef LINEBREAK
# undef LINEBREAK_LEN
# define LINEBREAK "\015"
# define LINEBREAK_LEN 1
#else