projects
/
platform
/
upstream
/
dbus.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3b8aa7d
)
dbus/dbus-sysdeps-win.c: use GetTempPath, not getenv, in _dbus_get_tmpdir (cherry...
author
Tor Lillqvist
<tml@iki.fi>
Wed, 22 Apr 2009 11:27:44 +0000
(13:27 +0200)
committer
Ralf Habacker
<ralf.habacker@freenet.de>
Mon, 30 Nov 2009 12:21:32 +0000
(13:21 +0100)
dbus/dbus-sysdeps-win.c
patch
|
blob
|
history
diff --git
a/dbus/dbus-sysdeps-win.c
b/dbus/dbus-sysdeps-win.c
index
9a29a39
..
2aec554
100644
(file)
--- a/
dbus/dbus-sysdeps-win.c
+++ b/
dbus/dbus-sysdeps-win.c
@@
-2388,17
+2388,14
@@
const char*
_dbus_get_tmpdir(void)
{
static const char* tmpdir = NULL;
+ static char buf[1000];
if (tmpdir == NULL)
{
- if (tmpdir == NULL)
- tmpdir = getenv("TMP");
- if (tmpdir == NULL)
- tmpdir = getenv("TEMP");
- if (tmpdir == NULL)
- tmpdir = getenv("TMPDIR");
- if (tmpdir == NULL)
- tmpdir = "C:\\Temp";
+ if (!GetTempPath (sizeof (buf), buf))
+ strcpy (buf, "\\");
+
+ tmpdir = buf;
}
_dbus_assert(tmpdir != NULL);