Commit b5eec813 authored by André Hentschel's avatar André Hentschel Committed by Alexandre Julliard

winemenubuilder: Respect TMPDIR environment variable.

parent 20006966
...@@ -1141,6 +1141,7 @@ static HRESULT platform_write_icon(IStream *icoStream, int exeIndex, LPCWSTR ico ...@@ -1141,6 +1141,7 @@ static HRESULT platform_write_icon(IStream *icoStream, int exeIndex, LPCWSTR ico
} best[ICNS_SLOTS]; } best[ICNS_SLOTS];
int indexes[ICNS_SLOTS]; int indexes[ICNS_SLOTS];
int i; int i;
const char* tmpdir;
char *icnsPath = NULL; char *icnsPath = NULL;
LARGE_INTEGER zero; LARGE_INTEGER zero;
HRESULT hr; HRESULT hr;
...@@ -1210,7 +1211,8 @@ static HRESULT platform_write_icon(IStream *icoStream, int exeIndex, LPCWSTR ico ...@@ -1210,7 +1211,8 @@ static HRESULT platform_write_icon(IStream *icoStream, int exeIndex, LPCWSTR ico
hr = E_OUTOFMEMORY; hr = E_OUTOFMEMORY;
goto end; 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) if (icnsPath == NULL)
{ {
hr = E_OUTOFMEMORY; hr = E_OUTOFMEMORY;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment