summaryrefslogtreecommitdiff
path: root/gfx/thebes/gfxPlatform.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 /gfx/thebes/gfxPlatform.cpp
parent930ddd693be251c86ee904dafbaef38234b692c0 (diff)
downloaduxp-9edf1b7bea5ff893f88911fc1a6a2dca3faeece9.tar.gz
Issue #1896 - Port GetNativePath changes from GRE.getnativepath-work
Diffstat (limited to 'gfx/thebes/gfxPlatform.cpp')
-rw-r--r--gfx/thebes/gfxPlatform.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/gfx/thebes/gfxPlatform.cpp b/gfx/thebes/gfxPlatform.cpp
index 7ec9139c0a..43980498d3 100644
--- a/gfx/thebes/gfxPlatform.cpp
+++ b/gfx/thebes/gfxPlatform.cpp
@@ -490,7 +490,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)))) {
@@ -502,7 +502,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;
}