diff options
author | Moonchild <moonchild@palemoon.org> | 2022-02-03 11:03:03 +0000 |
---|---|---|
committer | Moonchild <moonchild@palemoon.org> | 2022-02-03 11:03:03 +0000 |
commit | 8eb559895d0cd5640c05903513c9c5f310fb5431 (patch) | |
tree | a7e9512518d312e805872df1ec1a3641e7ee1c5e /xpcom | |
parent | 91cf7b05482d419b32b54119fdaa8c43c0011021 (diff) | |
download | aura-central-8eb559895d0cd5640c05903513c9c5f310fb5431.tar.gz |
Revert "Issue %3057 - Part 7: Convert GetNativePath to a lossless version."
This reverts commit 1510c3b1865125f65ff0087647323cc07b19631c.
Diffstat (limited to 'xpcom')
-rw-r--r-- | xpcom/io/nsLocalFileWin.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/xpcom/io/nsLocalFileWin.cpp b/xpcom/io/nsLocalFileWin.cpp index 297fd9cca..2ff05666b 100644 --- a/xpcom/io/nsLocalFileWin.cpp +++ b/xpcom/io/nsLocalFileWin.cpp @@ -3564,15 +3564,13 @@ nsLocalFile::SetNativeLeafName(const nsACString& aLeafName) NS_IMETHODIMP 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 losless but incompatible with filesystems using - // codepage encoding; this should not be an issue on supported Win versions. + //NS_WARNING("This API is lossy. Use GetPath !"); nsAutoString tmp; nsresult rv = GetPath(tmp); if (NS_SUCCEEDED(rv)) { - CopyUTF16toUTF8(tmp, aResult); + rv = NS_CopyUnicodeToNative(tmp, aResult); } + return rv; } |