winemenubuilder: Respect TMPDIR environment variable.

This commit is contained in:
André Hentschel 2014-09-23 22:23:35 +02:00 committed by Alexandre Julliard
parent 20006966ab
commit b5eec81315
1 changed files with 3 additions and 1 deletions

View File

@ -1141,6 +1141,7 @@ static HRESULT platform_write_icon(IStream *icoStream, int exeIndex, LPCWSTR ico
} best[ICNS_SLOTS];
int indexes[ICNS_SLOTS];
int i;
const char* tmpdir;
char *icnsPath = NULL;
LARGE_INTEGER zero;
HRESULT hr;
@ -1210,7 +1211,8 @@ static HRESULT platform_write_icon(IStream *icoStream, int exeIndex, LPCWSTR ico
hr = E_OUTOFMEMORY;
goto end;
}
icnsPath = heap_printf("/tmp/%s.icns", *nativeIdentifier);
if (!(tmpdir = getenv("TMPDIR"))) tmpdir = "/tmp";
icnsPath = heap_printf("%s/%s.icns", tmpdir, *nativeIdentifier);
if (icnsPath == NULL)
{
hr = E_OUTOFMEMORY;