You've already forked wine-staging
mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2025-09-12 18:50:20 -07:00
Rebase against c6393968754d64189f111e9277fb9060ec415fae.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
From 3f308239ced2e9fa2ac0b298eeb1ad5dde330840 Mon Sep 17 00:00:00 2001
|
||||
From a2e3bc27382f9c0c4894c6e0ab121f075e82db3e Mon Sep 17 00:00:00 2001
|
||||
From: "Erich E. Hoover" <erich.e.hoover@gmail.com>
|
||||
Date: Wed, 20 Aug 2014 11:26:48 -0600
|
||||
Subject: [PATCH] ntdll: Perform the Unix-style hidden file check within the
|
||||
@@ -9,10 +9,10 @@ Subject: [PATCH] ntdll: Perform the Unix-style hidden file check within the
|
||||
1 file changed, 9 insertions(+), 14 deletions(-)
|
||||
|
||||
diff --git a/dlls/ntdll/unix/file.c b/dlls/ntdll/unix/file.c
|
||||
index 7c737edd22c..c6b4928bd53 100644
|
||||
index 73d4cce90ae..b790cde3f90 100644
|
||||
--- a/dlls/ntdll/unix/file.c
|
||||
+++ b/dlls/ntdll/unix/file.c
|
||||
@@ -1213,15 +1213,15 @@ static BOOLEAN get_dir_case_sensitivity( const char *dir )
|
||||
@@ -1328,15 +1328,15 @@ static BOOLEAN get_dir_case_sensitivity( const char *dir )
|
||||
*
|
||||
* Check if the specified file should be hidden based on its name and the show dot files option.
|
||||
*/
|
||||
@@ -20,20 +20,20 @@ index 7c737edd22c..c6b4928bd53 100644
|
||||
+static BOOL is_hidden_file( const char *name )
|
||||
{
|
||||
- WCHAR *p, *end;
|
||||
+ char *p, *end;
|
||||
+ const char *p, *end;
|
||||
|
||||
if (show_dot_files) return FALSE;
|
||||
|
||||
- end = p = name->Buffer + name->Length/sizeof(WCHAR);
|
||||
- while (p > name->Buffer && IS_SEPARATOR(p[-1])) p--;
|
||||
- while (p > name->Buffer && !IS_SEPARATOR(p[-1])) p--;
|
||||
+ end = p = (char *)name + strlen(name);
|
||||
+ while (p > name && IS_SEPARATOR(p[-1])) p--;
|
||||
+ while (p > name && !IS_SEPARATOR(p[-1])) p--;
|
||||
if (p == end || *p != '.') return FALSE;
|
||||
/* make sure it isn't '.' or '..' */
|
||||
if (p + 1 == end) return FALSE;
|
||||
@@ -1567,6 +1567,10 @@ static int get_file_info( const char *path, struct stat *st, ULONG *attr )
|
||||
- while (p > name->Buffer && p[-1] == '\\') p--;
|
||||
- while (p > name->Buffer && p[-1] != '\\') p--;
|
||||
+ end = p = name + strlen( name );
|
||||
+ while (p > name && p[-1] == '\\') p--;
|
||||
+ while (p > name && p[-1] != '\\') p--;
|
||||
return (p < end && *p == '.');
|
||||
}
|
||||
|
||||
@@ -1679,6 +1679,10 @@ static int get_file_info( const char *path, struct stat *st, ULONG *attr )
|
||||
free( parent_path );
|
||||
}
|
||||
*attr |= get_file_attributes( st );
|
||||
@@ -44,7 +44,7 @@ index 7c737edd22c..c6b4928bd53 100644
|
||||
len = xattr_get( path, SAMBA_XATTR_DOS_ATTRIB, hexattr, sizeof(hexattr)-1 );
|
||||
if (len == -1) return ret;
|
||||
*attr |= get_file_xattr( hexattr, len );
|
||||
@@ -2077,11 +2081,6 @@ static NTSTATUS get_dir_data_entry( struct dir_data *dir_data, void *info_ptr, I
|
||||
@@ -2186,11 +2190,6 @@ static NTSTATUS get_dir_data_entry( struct dir_data *dir_data, void *info_ptr, I
|
||||
if (class != FileNamesInformation)
|
||||
{
|
||||
if (st.st_dev != dir_data->id.dev) st.st_ino = 0; /* ignore inode if on a different device */
|
||||
@@ -56,7 +56,7 @@ index 7c737edd22c..c6b4928bd53 100644
|
||||
fill_file_info( &st, attributes, info, class );
|
||||
}
|
||||
|
||||
@@ -3838,7 +3837,6 @@ NTSTATUS WINAPI NtQueryFullAttributesFile( const OBJECT_ATTRIBUTES *attr,
|
||||
@@ -4106,7 +4105,6 @@ NTSTATUS WINAPI NtQueryFullAttributesFile( const OBJECT_ATTRIBUTES *attr,
|
||||
info->AllocationSize = std.AllocationSize;
|
||||
info->EndOfFile = std.EndOfFile;
|
||||
info->FileAttributes = basic.FileAttributes;
|
||||
@@ -64,7 +64,7 @@ index 7c737edd22c..c6b4928bd53 100644
|
||||
}
|
||||
free( unix_name );
|
||||
}
|
||||
@@ -3865,10 +3863,7 @@ NTSTATUS WINAPI NtQueryAttributesFile( const OBJECT_ATTRIBUTES *attr, FILE_BASIC
|
||||
@@ -4133,10 +4131,7 @@ NTSTATUS WINAPI NtQueryAttributesFile( const OBJECT_ATTRIBUTES *attr, FILE_BASIC
|
||||
else if (!S_ISREG(st.st_mode) && !S_ISDIR(st.st_mode))
|
||||
status = STATUS_INVALID_INFO_CLASS;
|
||||
else
|
||||
@@ -76,5 +76,5 @@ index 7c737edd22c..c6b4928bd53 100644
|
||||
}
|
||||
else WARN( "%s not found (%x)\n", debugstr_us(attr->ObjectName), status );
|
||||
--
|
||||
2.27.0
|
||||
2.30.2
|
||||
|
||||
|
Reference in New Issue
Block a user