Commit 12d37412 authored by Piotr Caban's avatar Piotr Caban Committed by Alexandre Julliard

scrrun: Fix IFile::get_Attributes tests and implementation.

parent 00289d5b
......@@ -791,7 +791,9 @@ static HRESULT WINAPI file_get_Attributes(IFile *iface, FileAttribute *pfa)
if(fa == INVALID_FILE_ATTRIBUTES)
return create_error(GetLastError());
*pfa = fa & ~FILE_ATTRIBUTE_NORMAL;
*pfa = fa & (FILE_ATTRIBUTE_READONLY | FILE_ATTRIBUTE_HIDDEN |
FILE_ATTRIBUTE_SYSTEM | FILE_ATTRIBUTE_DIRECTORY | FILE_ATTRIBUTE_ARCHIVE |
FILE_ATTRIBUTE_REPARSE_POINT | FILE_ATTRIBUTE_COMPRESSED);
return S_OK;
}
......
......@@ -478,9 +478,7 @@ static void test_GetFile(void)
hr = IFileSystem3_GetFile(fs3, NULL, &file);
ok(hr == E_INVALIDARG, "GetFile returned %x, expected E_INVALIDARG\n", hr);
hf = CreateFileW(path, GENERIC_WRITE, 0, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
if(hf != INVALID_HANDLE_VALUE) {
CloseHandle(hf);
if(GetFileAttributesW(path) != INVALID_FILE_ATTRIBUTES) {
skip("File already exists, skipping GetFile tests\n");
SysFreeString(path);
return;
......@@ -503,7 +501,9 @@ static void test_GetFile(void)
ok(hr == S_OK, "GetFile returned %x, expected S_OK\n", hr);
hr = IFile_get_Attributes(file, &fa);
gfa = GetFileAttributesW(get_file) & ~FILE_ATTRIBUTE_NORMAL;
gfa = GetFileAttributesW(get_file) & (FILE_ATTRIBUTE_READONLY | FILE_ATTRIBUTE_HIDDEN |
FILE_ATTRIBUTE_SYSTEM | FILE_ATTRIBUTE_DIRECTORY | FILE_ATTRIBUTE_ARCHIVE |
FILE_ATTRIBUTE_REPARSE_POINT | FILE_ATTRIBUTE_COMPRESSED);
ok(hr == S_OK, "get_Attributes returned %x, expected S_OK\n", hr);
ok(fa == gfa, "fa = %x, expected %x\n", fa, gfa);
......
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