mirror of
git://source.winehq.org/git/wine.git
synced 2024-09-16 03:46:49 +00:00
ntdll: Only infer hidden attribute from file name if xattr is not present.
Signed-off-by: Torge Matthies <tmatthies@codeweavers.com>
This commit is contained in:
parent
a8b6966a91
commit
d433986924
|
@ -4107,7 +4107,7 @@ static void test_dotfile_file_attributes(void)
|
||||||
status = nt_get_file_attrs(filename, &attrs);
|
status = nt_get_file_attrs(filename, &attrs);
|
||||||
ok( status == STATUS_SUCCESS, "got %#lx\n", status );
|
ok( status == STATUS_SUCCESS, "got %#lx\n", status );
|
||||||
ok( attrs & FILE_ATTRIBUTE_SYSTEM, "got attributes %#lx\n", attrs );
|
ok( attrs & FILE_ATTRIBUTE_SYSTEM, "got attributes %#lx\n", attrs );
|
||||||
todo_wine ok( !(attrs & FILE_ATTRIBUTE_HIDDEN), "got attributes %#lx\n", attrs );
|
ok( !(attrs & FILE_ATTRIBUTE_HIDDEN), "got attributes %#lx\n", attrs );
|
||||||
|
|
||||||
status = pNtQueryInformationFile( h, &io, &info, sizeof(info), FileBasicInformation );
|
status = pNtQueryInformationFile( h, &io, &info, sizeof(info), FileBasicInformation );
|
||||||
ok( status == STATUS_SUCCESS, "got %#lx\n", status );
|
ok( status == STATUS_SUCCESS, "got %#lx\n", status );
|
||||||
|
|
|
@ -1681,14 +1681,13 @@ static int get_file_info( const char *path, struct stat *st, ULONG *attr )
|
||||||
}
|
}
|
||||||
*attr |= get_file_attributes( st );
|
*attr |= get_file_attributes( st );
|
||||||
|
|
||||||
if (is_hidden_file( path ))
|
|
||||||
*attr |= FILE_ATTRIBUTE_HIDDEN;
|
|
||||||
|
|
||||||
attr_len = xattr_get( path, SAMBA_XATTR_DOS_ATTRIB, attr_data, sizeof(attr_data)-1 );
|
attr_len = xattr_get( path, SAMBA_XATTR_DOS_ATTRIB, attr_data, sizeof(attr_data)-1 );
|
||||||
if (attr_len != -1)
|
if (attr_len != -1)
|
||||||
*attr |= parse_samba_dos_attrib_data( attr_data, attr_len );
|
*attr |= parse_samba_dos_attrib_data( attr_data, attr_len );
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
if (is_hidden_file( path ))
|
||||||
|
*attr |= FILE_ATTRIBUTE_HIDDEN;
|
||||||
if (errno == ENOTSUP) return ret;
|
if (errno == ENOTSUP) return ret;
|
||||||
#ifdef ENODATA
|
#ifdef ENODATA
|
||||||
if (errno == ENODATA) return ret;
|
if (errno == ENODATA) return ret;
|
||||||
|
|
Loading…
Reference in a new issue