summaryrefslogtreecommitdiff
path: root/mailnews
diff options
context:
space:
mode:
Diffstat (limited to 'mailnews')
-rw-r--r--mailnews/addrbook/src/nsAddrDatabase.cpp4
-rw-r--r--mailnews/base/src/nsMessenger.cpp12
-rw-r--r--mailnews/base/src/nsMsgFolderCache.cpp4
-rw-r--r--mailnews/compose/src/nsMsgCompUtils.cpp4
-rw-r--r--mailnews/compose/src/nsMsgCompose.cpp4
-rw-r--r--mailnews/db/msgdb/src/nsMsgDatabase.cpp8
-rw-r--r--mailnews/imap/src/nsImapMailFolder.cpp8
-rw-r--r--mailnews/import/outlook/src/MapiMessage.cpp4
-rw-r--r--mailnews/local/src/nsLocalUtils.cpp4
-rw-r--r--mailnews/local/src/nsMailboxService.cpp4
10 files changed, 56 insertions, 0 deletions
diff --git a/mailnews/addrbook/src/nsAddrDatabase.cpp b/mailnews/addrbook/src/nsAddrDatabase.cpp
index 463437958f..51dbe8237f 100644
--- a/mailnews/addrbook/src/nsAddrDatabase.cpp
+++ b/mailnews/addrbook/src/nsAddrDatabase.cpp
@@ -482,7 +482,11 @@ NS_IMETHODIMP nsAddrDatabase::OpenMDB(nsIFile *dbName, bool create)
nsIMdbThumb *thumb = nullptr;
nsAutoCString filePath;
+#ifdef XP_WIN
+ ret = dbName->GetPersistentDescriptor(filePath);
+#else
ret = dbName->GetNativePath(filePath);
+#endif
NS_ENSURE_SUCCESS(ret, ret);
nsIMdbHeap* dbHeap = nullptr;
diff --git a/mailnews/base/src/nsMessenger.cpp b/mailnews/base/src/nsMessenger.cpp
index 953b462b6a..07efe0cd73 100644
--- a/mailnews/base/src/nsMessenger.cpp
+++ b/mailnews/base/src/nsMessenger.cpp
@@ -598,7 +598,11 @@ nsMessenger::DetachAttachmentsWOPrompts(nsIFile* aDestFolder,
NS_ENSURE_SUCCESS(rv, rv);
nsAutoCString path;
+#ifdef XP_WIN
+ rv = attachmentDestination->GetPersistentDescriptor(path);
+#else
rv = attachmentDestination->GetNativePath(path);
+#endif
NS_ENSURE_SUCCESS(rv, rv);
nsAutoString unescapedFileName;
@@ -860,7 +864,11 @@ nsMessenger::SaveOneAttachment(const char * aContentType, const char * aURL,
SetLastSaveDirectory(localFile);
nsCString dirName;
+#ifdef XP_WIN
+ rv = localFile->GetPersistentDescriptor(dirName);
+#else
rv = localFile->GetNativePath(dirName);
+#endif
NS_ENSURE_SUCCESS(rv, rv);
nsSaveAllAttachmentsState *saveState =
@@ -927,7 +935,11 @@ nsMessenger::SaveAllAttachments(uint32_t count,
nsCString dirName;
nsSaveAllAttachmentsState *saveState = nullptr;
+#ifdef XP_WIN
+ rv = localFile->GetPersistentDescriptor(dirName);
+#else
rv = localFile->GetNativePath(dirName);
+#endif
NS_ENSURE_SUCCESS(rv, rv);
saveState = new nsSaveAllAttachmentsState(count,
diff --git a/mailnews/base/src/nsMsgFolderCache.cpp b/mailnews/base/src/nsMsgFolderCache.cpp
index 9510a6e3d2..caab422aa9 100644
--- a/mailnews/base/src/nsMsgFolderCache.cpp
+++ b/mailnews/base/src/nsMsgFolderCache.cpp
@@ -236,7 +236,11 @@ NS_IMETHODIMP nsMsgFolderCache::Init(nsIFile *aFile)
aFile->Exists(&exists);
nsAutoCString dbPath;
+#ifdef XP_WIN
+ aFile->GetPersistentDescriptor(dbPath);
+#else
aFile->GetNativePath(dbPath);
+#endif
// ### evil cast until MDB supports file streams.
nsresult rv = OpenMDB(dbPath, exists);
// if this fails and panacea.dat exists, try blowing away the db and recreating it
diff --git a/mailnews/compose/src/nsMsgCompUtils.cpp b/mailnews/compose/src/nsMsgCompUtils.cpp
index 6632e3257c..f31c5dc1f3 100644
--- a/mailnews/compose/src/nsMsgCompUtils.cpp
+++ b/mailnews/compose/src/nsMsgCompUtils.cpp
@@ -118,7 +118,11 @@ nsMsgCreateTempFileName(const char *tFileName)
return nullptr;
nsCString tempString;
+#ifdef XP_WIN
+ rv = tmpFile->GetPersistentDescriptor(tempString);
+#else
rv = tmpFile->GetNativePath(tempString);
+#endif
if (NS_FAILED(rv))
return nullptr;
diff --git a/mailnews/compose/src/nsMsgCompose.cpp b/mailnews/compose/src/nsMsgCompose.cpp
index a7c2140ad7..3dbf741878 100644
--- a/mailnews/compose/src/nsMsgCompose.cpp
+++ b/mailnews/compose/src/nsMsgCompose.cpp
@@ -4518,7 +4518,11 @@ nsMsgCompose::ProcessSignature(nsIMsgIdentity *identity, bool aQuoted, nsString
{
rv = identity->GetSignature(getter_AddRefs(sigFile));
if (NS_SUCCEEDED(rv) && sigFile) {
+#ifdef XP_WIN
+ rv = sigFile->GetPersistentDescriptor(sigNativePath);
+#else
rv = sigFile->GetNativePath(sigNativePath);
+#endif
if (NS_SUCCEEDED(rv) && !sigNativePath.IsEmpty()) {
bool exists = false;
sigFile->Exists(&exists);
diff --git a/mailnews/db/msgdb/src/nsMsgDatabase.cpp b/mailnews/db/msgdb/src/nsMsgDatabase.cpp
index 31da7bc5e1..96e74359cb 100644
--- a/mailnews/db/msgdb/src/nsMsgDatabase.cpp
+++ b/mailnews/db/msgdb/src/nsMsgDatabase.cpp
@@ -939,7 +939,11 @@ NS_IMETHODIMP nsMsgDatabase::NotifyAnnouncerGoingAway(void)
bool nsMsgDatabase::MatchDbName(nsIFile *dbName) // returns true if they match
{
nsCString dbPath;
+#ifdef XP_WIN
+ dbName->GetPersistentDescriptor(dbPath);
+#else
dbName->GetNativePath(dbPath);
+#endif
return dbPath.Equals(m_dbName);
}
@@ -1197,7 +1201,11 @@ nsresult nsMsgDatabase::OpenInternal(nsMsgDBService *aDBService,
bool aLeaveInvalidDB, bool sync)
{
nsAutoCString summaryFilePath;
+#ifdef XP_WIN
+ summaryFile->GetPersistentDescriptor(summaryFilePath);
+#else
summaryFile->GetNativePath(summaryFilePath);
+#endif
MOZ_LOG(DBLog, LogLevel::Info, ("nsMsgDatabase::Open(%s, %s, %p, %s)\n",
(const char*)summaryFilePath.get(), aCreate ? "TRUE":"FALSE",
diff --git a/mailnews/imap/src/nsImapMailFolder.cpp b/mailnews/imap/src/nsImapMailFolder.cpp
index da1411cd08..8823b818e7 100644
--- a/mailnews/imap/src/nsImapMailFolder.cpp
+++ b/mailnews/imap/src/nsImapMailFolder.cpp
@@ -3203,7 +3203,11 @@ NS_IMETHODIMP nsImapMailFolder::BeginCopy(nsIMsgDBHdr *message)
if (NS_FAILED(rv))
{
nsCString nativePath;
+#ifdef XP_WIN
+ m_copyState->m_tmpFile->GetPersistentDescriptor(nativePath);
+#else
m_copyState->m_tmpFile->GetNativePath(nativePath);
+#endif
MOZ_LOG(IMAP, mozilla::LogLevel::Info, ("couldn't remove prev temp file %s: %lx\n", nativePath.get(), rv));
}
m_copyState->m_tmpFile = nullptr;
@@ -8883,7 +8887,11 @@ NS_IMETHODIMP nsImapMailFolder::RenameSubFolders(nsIMsgWindow *msgWindow, nsIMsg
newParentPathFile->AppendNative(oldLeafName);
nsCString newPathStr;
+#ifdef XP_WIN
+ newParentPathFile->GetPersistentDescriptor(newPathStr);
+#else
newParentPathFile->GetNativePath(newPathStr);
+#endif
nsCOMPtr<nsIFile> newPathFile = do_CreateInstance(NS_LOCAL_FILE_CONTRACTID, &rv);
NS_ENSURE_SUCCESS(rv, rv);
diff --git a/mailnews/import/outlook/src/MapiMessage.cpp b/mailnews/import/outlook/src/MapiMessage.cpp
index 6b02db3145..2536c16809 100644
--- a/mailnews/import/outlook/src/MapiMessage.cpp
+++ b/mailnews/import/outlook/src/MapiMessage.cpp
@@ -887,7 +887,11 @@ bool CMapiMessage::CopyBinAttachToFile(LPATTACH lpAttach,
NS_ENSURE_SUCCESS(rv, false);
nsCString tmpPath;
+#ifdef XP_WIN
+ _tmp_file->GetPersistentDescriptor(tmpPath);
+#else
_tmp_file->GetNativePath(tmpPath);
+#endif
LPSTREAM lpStreamFile;
HRESULT hr = CMapiApi::OpenStreamOnFile(gpMapiAllocateBuffer, gpMapiFreeBuffer, STGM_READWRITE | STGM_CREATE,
const_cast<char*>(tmpPath.get()), NULL, &lpStreamFile);
diff --git a/mailnews/local/src/nsLocalUtils.cpp b/mailnews/local/src/nsLocalUtils.cpp
index 14a6a2f218..352ba9f5ad 100644
--- a/mailnews/local/src/nsLocalUtils.cpp
+++ b/mailnews/local/src/nsLocalUtils.cpp
@@ -150,7 +150,11 @@ nsLocalURI2Path(const char* rootURI, const char* uriStr,
nsCString localNativePath;
+#ifdef XP_WIN
+ localPath->GetPersistentDescriptor(localNativePath);
+#else
localPath->GetNativePath(localNativePath);
+#endif
nsEscapeNativePath(localNativePath);
pathResult = localNativePath.get();
const char *curPos = uriStr + PL_strlen(rootURI);
diff --git a/mailnews/local/src/nsMailboxService.cpp b/mailnews/local/src/nsMailboxService.cpp
index 00a0d87c8f..3621df262c 100644
--- a/mailnews/local/src/nsMailboxService.cpp
+++ b/mailnews/local/src/nsMailboxService.cpp
@@ -52,7 +52,11 @@ nsresult nsMailboxService::ParseMailbox(nsIMsgWindow *aMsgWindow, nsIFile *aMail
// okay now generate the url string
nsCString mailboxPath;
+#ifdef XP_WIN
+ aMailboxPath->GetPersistentDescriptor(mailboxPath);
+#else
aMailboxPath->GetNativePath(mailboxPath);
+#endif
nsAutoCString buf;
MsgEscapeURL(mailboxPath,
nsINetUtil::ESCAPE_URL_MINIMAL | nsINetUtil::ESCAPE_URL_FORCED, buf);