scrrun: Generate temp name with tmp suffix.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=52163 Signed-off-by: Robert Wilhelm <robert.wilhelm@gmx.net> Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
a893207c71
commit
f4d40a7379
|
@ -3318,12 +3318,12 @@ static HRESULT WINAPI filesys_GetTempName(IFileSystem3 *iface, BSTR *result)
|
|||
if (!result)
|
||||
return E_POINTER;
|
||||
|
||||
if (!(*result = SysAllocStringLen(NULL, 12)))
|
||||
if (!(*result = SysAllocStringLen(NULL, 13)))
|
||||
return E_OUTOFMEMORY;
|
||||
|
||||
if(!RtlGenRandom(&random, sizeof(random)))
|
||||
return E_FAIL;
|
||||
swprintf(*result, 12, L"rad%05X.txt", random & 0xfffff);
|
||||
swprintf(*result, 13, L"rad%05X.tmp", random & 0xfffff);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
|
|
@ -482,7 +482,7 @@ static void test_GetTempName(void)
|
|||
result = (BSTR)0xdeadbeef;
|
||||
hr = IFileSystem3_GetTempName(fs3, &result);
|
||||
ok(hr == S_OK, "GetTempName returned %x, expected S_OK\n", hr);
|
||||
todo_wine ok(!!wcsstr( result,L".tmp"), "GetTempName returned %s, expected .tmp suffix\n", debugstr_w(result));
|
||||
ok(!!wcsstr( result,L".tmp"), "GetTempName returned %s, expected .tmp suffix\n", debugstr_w(result));
|
||||
SysFreeString(result);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue