summaryrefslogtreecommitdiff
path: root/system/graphics/thebes
diff options
context:
space:
mode:
authorMoonchild <moonchild@palemoon.org>2022-02-01 17:59:00 +0000
committerMoonchild <moonchild@palemoon.org>2022-02-01 17:59:00 +0000
commita510a07da4ecd7d44532f96efc85a2ed7a4272a5 (patch)
treeb6b58e445388247ebba69807f73aca73cbc8b307 /system/graphics/thebes
parent7a400c29366038f1f2ac28741e9c9bd8fd8fa062 (diff)
downloadaura-central-a510a07da4ecd7d44532f96efc85a2ed7a4272a5.tar.gz
Issue %3057 - Part 5: Stop using GetNativePath in graphics on Windows.
Diffstat (limited to 'system/graphics/thebes')
-rw-r--r--system/graphics/thebes/gfxPlatform.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/system/graphics/thebes/gfxPlatform.cpp b/system/graphics/thebes/gfxPlatform.cpp
index 35dad6659..92da2a237 100644
--- a/system/graphics/thebes/gfxPlatform.cpp
+++ b/system/graphics/thebes/gfxPlatform.cpp
@@ -487,7 +487,7 @@ void RecordingPrefChanged(const char *aPrefName, void *aClosure)
nsAdoptingString prefFileName = Preferences::GetString("gfx.2d.recordingfile");
if (prefFileName) {
- fileName.Append(NS_ConvertUTF16toUTF8(prefFileName));
+ CopyUTF16toUTF8(prefFileName, fileName);
} else {
nsCOMPtr<nsIFile> tmpFile;
if (NS_FAILED(NS_GetSpecialDirectory(NS_OS_TEMP_DIR, getter_AddRefs(tmpFile)))) {
@@ -499,7 +499,12 @@ void RecordingPrefChanged(const char *aPrefName, void *aClosure)
if (NS_FAILED(rv))
return;
+#ifdef XP_WIN
+ rv = tmpFile->GetPath(prefFileName);
+ CopyUTF16toUTF8(prefFileName, fileName);
+#else
rv = tmpFile->GetNativePath(fileName);
+#endif
if (NS_FAILED(rv))
return;
}