winemenubuilder: Respect TMPDIR environment variable.
This commit is contained in:
parent
20006966ab
commit
b5eec81315
@ -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
|
|||||||
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;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user