diff options
Diffstat (limited to 'mailnews/base/src')
-rw-r--r-- | mailnews/base/src/nsMessenger.cpp | 12 | ||||
-rw-r--r-- | mailnews/base/src/nsMsgFolderCache.cpp | 4 |
2 files changed, 16 insertions, 0 deletions
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 |