mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 714286 followup - Fix the temp path detection code for Windows; r=mccr8
This commit is contained in:
parent
0bcdb4be05
commit
0b39385507
@ -1401,11 +1401,17 @@ public:
|
||||
NS_IMETHOD Begin()
|
||||
{
|
||||
char name[MAXPATHLEN] = {'\0'};
|
||||
#ifdef XP_WIN
|
||||
// On Windows, tmpnam returns useless stuff, such as "\\s164.".
|
||||
// Therefore we need to call the APIs directly.
|
||||
GetTempPathA(mozilla::ArrayLength(name), name);
|
||||
#else
|
||||
tmpnam(name);
|
||||
char *lastSlash = strrchr(name, XPCOM_FILE_PATH_SEPARATOR[0]);
|
||||
if (lastSlash) {
|
||||
*lastSlash = '\0';
|
||||
}
|
||||
#endif
|
||||
sprintf(name, "%s%scc-edges-%d.%d.log", name,
|
||||
XPCOM_FILE_PATH_SEPARATOR,
|
||||
++gLogCounter, base::GetCurrentProcId());
|
||||
|
Loading…
Reference in New Issue
Block a user