summaryrefslogtreecommitdiff
path: root/mailnews/base/src/nsMessenger.cpp
diff options
context:
space:
mode:
authorMoonchild <moonchild@palemoon.org>2022-05-09 22:38:16 +0000
committerMoonchild <moonchild@palemoon.org>2022-05-09 22:38:16 +0000
commit9edf1b7bea5ff893f88911fc1a6a2dca3faeece9 (patch)
tree98bd9b0c7e3ca3e517e9e43dea157707b13f6bdb /mailnews/base/src/nsMessenger.cpp
parent930ddd693be251c86ee904dafbaef38234b692c0 (diff)
downloaduxp-getnativepath-work.tar.gz
Issue #1896 - Port GetNativePath changes from GRE.getnativepath-work
Diffstat (limited to 'mailnews/base/src/nsMessenger.cpp')
-rw-r--r--mailnews/base/src/nsMessenger.cpp12
1 files changed, 12 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,