diff options
author | Matt A. Tobin <email@mattatobin.com> | 2022-04-09 16:53:35 -0500 |
---|---|---|
committer | Matt A. Tobin <email@mattatobin.com> | 2022-04-09 16:53:35 -0500 |
commit | 853befa9d5604186c6c452afe07a37d372700e26 (patch) | |
tree | 29493ecd6a4dd21ff966c29f4fc20a396ef9d715 /mailnews | |
parent | 645c946aa77a55b259bd98de78a6a9d9c342ed94 (diff) | |
download | aura-central-853befa9d5604186c6c452afe07a37d372700e26.tar.gz |
Revert "Issue %3057 - Part 9: Adjust all callsites for no longer using GetNativePath"
This reverts commit 097fa969802f76530384926e8ef1f56777be3783.
Diffstat (limited to 'mailnews')
-rw-r--r-- | mailnews/addrbook/src/nsAddrDatabase.cpp | 4 | ||||
-rw-r--r-- | mailnews/base/src/nsMessenger.cpp | 12 | ||||
-rw-r--r-- | mailnews/base/src/nsMsgFolderCache.cpp | 4 | ||||
-rw-r--r-- | mailnews/compose/src/nsMsgCompUtils.cpp | 4 | ||||
-rw-r--r-- | mailnews/compose/src/nsMsgCompose.cpp | 4 | ||||
-rw-r--r-- | mailnews/db/msgdb/src/nsMsgDatabase.cpp | 8 | ||||
-rw-r--r-- | mailnews/imap/src/nsImapMailFolder.cpp | 6 | ||||
-rw-r--r-- | mailnews/import/outlook/src/MapiMessage.cpp | 4 | ||||
-rw-r--r-- | mailnews/local/src/nsLocalUtils.cpp | 4 | ||||
-rw-r--r-- | mailnews/local/src/nsMailboxService.cpp | 4 |
10 files changed, 1 insertions, 53 deletions
diff --git a/mailnews/addrbook/src/nsAddrDatabase.cpp b/mailnews/addrbook/src/nsAddrDatabase.cpp index 51dbe8237..463437958 100644 --- a/mailnews/addrbook/src/nsAddrDatabase.cpp +++ b/mailnews/addrbook/src/nsAddrDatabase.cpp @@ -482,11 +482,7 @@ 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 99a1c83d9..8719530f7 100644 --- a/mailnews/base/src/nsMessenger.cpp +++ b/mailnews/base/src/nsMessenger.cpp @@ -598,11 +598,7 @@ 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; @@ -858,11 +854,7 @@ 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 = @@ -929,11 +921,7 @@ 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 caab422aa..9510a6e3d 100644 --- a/mailnews/base/src/nsMsgFolderCache.cpp +++ b/mailnews/base/src/nsMsgFolderCache.cpp @@ -236,11 +236,7 @@ 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 f31c5dc1f..6632e3257 100644 --- a/mailnews/compose/src/nsMsgCompUtils.cpp +++ b/mailnews/compose/src/nsMsgCompUtils.cpp @@ -118,11 +118,7 @@ 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 3dbf74187..a7c2140ad 100644 --- a/mailnews/compose/src/nsMsgCompose.cpp +++ b/mailnews/compose/src/nsMsgCompose.cpp @@ -4518,11 +4518,7 @@ 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 96e74359c..31da7bc5e 100644 --- a/mailnews/db/msgdb/src/nsMsgDatabase.cpp +++ b/mailnews/db/msgdb/src/nsMsgDatabase.cpp @@ -939,11 +939,7 @@ 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); } @@ -1201,11 +1197,7 @@ 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 04d639512..da1411cd0 100644 --- a/mailnews/imap/src/nsImapMailFolder.cpp +++ b/mailnews/imap/src/nsImapMailFolder.cpp @@ -3203,7 +3203,7 @@ NS_IMETHODIMP nsImapMailFolder::BeginCopy(nsIMsgDBHdr *message) if (NS_FAILED(rv)) { nsCString nativePath; - m_copyState->m_tmpFile->GetPersistentDescriptor(nativePath); + m_copyState->m_tmpFile->GetNativePath(nativePath); MOZ_LOG(IMAP, mozilla::LogLevel::Info, ("couldn't remove prev temp file %s: %lx\n", nativePath.get(), rv)); } m_copyState->m_tmpFile = nullptr; @@ -8883,11 +8883,7 @@ 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 2536c1680..6b02db314 100644 --- a/mailnews/import/outlook/src/MapiMessage.cpp +++ b/mailnews/import/outlook/src/MapiMessage.cpp @@ -887,11 +887,7 @@ 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 aac4290a9..14a6a2f21 100644 --- a/mailnews/local/src/nsLocalUtils.cpp +++ b/mailnews/local/src/nsLocalUtils.cpp @@ -150,11 +150,7 @@ 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 3621df262..00a0d87c8 100644 --- a/mailnews/local/src/nsMailboxService.cpp +++ b/mailnews/local/src/nsMailboxService.cpp @@ -52,11 +52,7 @@ 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); |