kernel32: Set last error to ERROR_FILE_NOT_FOUND if lpAppName is NULL.
This commit is contained in:
parent
287b07fddc
commit
f1308f9b40
|
@ -1446,8 +1446,7 @@ BOOL WINAPI WritePrivateProfileStringW( LPCWSTR section, LPCWSTR entry,
|
|||
else if (PROFILE_Open( filename, TRUE ))
|
||||
{
|
||||
if (!section) {
|
||||
FIXME("(NULL?,%s,%s,%s)?\n",
|
||||
debugstr_w(entry), debugstr_w(string), debugstr_w(filename));
|
||||
SetLastError(ERROR_FILE_NOT_FOUND);
|
||||
} else {
|
||||
ret = PROFILE_SetString( section, entry, string, FALSE);
|
||||
PROFILE_FlushFile();
|
||||
|
|
|
@ -855,11 +855,8 @@ static void test_WritePrivateProfileString(void)
|
|||
SetLastError(0xdeadbeef);
|
||||
ret = WritePrivateProfileStringA(NULL, "key", "string", path);
|
||||
ok(ret == FALSE, "Expected FALSE, got %d\n", ret);
|
||||
todo_wine
|
||||
{
|
||||
ok(GetLastError() == ERROR_FILE_NOT_FOUND,
|
||||
"Expected ERROR_FILE_NOT_FOUND, got %d\n", GetLastError());
|
||||
}
|
||||
ok(GetLastError() == ERROR_FILE_NOT_FOUND,
|
||||
"Expected ERROR_FILE_NOT_FOUND, got %d\n", GetLastError());
|
||||
ok(check_file_data(path, data), "File doesn't match\n");
|
||||
DeleteFileA(path);
|
||||
|
||||
|
|
Loading…
Reference in New Issue