diff options
author | Matt A. Tobin <email@mattatobin.com> | 2022-04-09 16:54:15 -0500 |
---|---|---|
committer | Matt A. Tobin <email@mattatobin.com> | 2022-04-09 16:54:15 -0500 |
commit | 01bdf114caed96e4ac31f496fc6b0357a2999fea (patch) | |
tree | e76657cd971745536c9bb6c9e9c9cf8c25869787 /xpcom | |
parent | 224f7795af9493bc30730acd0f9781e53ce00849 (diff) | |
download | aura-central-01bdf114caed96e4ac31f496fc6b0357a2999fea.tar.gz |
Revert "Issue %3057 - Part 8: Convert other Native cases to lossless versions."
This reverts commit 756cfe85af63d4899182bc678af6d18d77a62351.
Diffstat (limited to 'xpcom')
-rw-r--r-- | xpcom/io/nsLocalFileWin.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/xpcom/io/nsLocalFileWin.cpp b/xpcom/io/nsLocalFileWin.cpp index 68824bf66..297fd9cca 100644 --- a/xpcom/io/nsLocalFileWin.cpp +++ b/xpcom/io/nsLocalFileWin.cpp @@ -3538,10 +3538,11 @@ nsLocalFile::AppendRelativeNativePath(const nsACString& aNode) NS_IMETHODIMP nsLocalFile::GetNativeLeafName(nsACString& aLeafName) { + //NS_WARNING("This API is lossy. Use GetLeafName !"); nsAutoString tmp; nsresult rv = GetLeafName(tmp); if (NS_SUCCEEDED(rv)) { - rv = CopyUTF16toUTF8(tmp, aLeafName); + rv = NS_CopyUnicodeToNative(tmp, aLeafName); } return rv; @@ -3565,7 +3566,7 @@ nsLocalFile::GetNativePath(nsACString& aResult) { // Note: As of #3057 this function is a bit of a misnomer as it ignores // clamped code pages and converts to UTF-8 at all times. - // This makes it lossless but incompatible with filesystems using + // This makes it losless but incompatible with filesystems using // codepage encoding; this should not be an issue on supported Win versions. nsAutoString tmp; nsresult rv = GetPath(tmp); @@ -3579,8 +3580,9 @@ nsLocalFile::GetNativePath(nsACString& aResult) NS_IMETHODIMP nsLocalFile::GetNativeCanonicalPath(nsACString& aResult) { + NS_WARNING("This method is lossy. Use GetCanonicalPath !"); EnsureShortPath(); - CopyUTF16toUTF8(mShortWorkingPath, aResult); + NS_CopyUnicodeToNative(mShortWorkingPath, aResult); return NS_OK; } @@ -3646,10 +3648,11 @@ nsLocalFile::GetNativeTarget(nsACString& aResult) // Check we are correctly initialized. CHECK_mWorkingPath(); + NS_WARNING("This API is lossy. Use GetTarget !"); nsAutoString tmp; nsresult rv = GetTarget(tmp); if (NS_SUCCEEDED(rv)) { - rv = CopyUTF16toUTF8(tmp, aResult); + rv = NS_CopyUnicodeToNative(tmp, aResult); } return rv; |