Re: [PATCH v23 0/6] MR1148: ntdll: Mark created files beginning with a dot as not hidden.
Alexandre Julliard (@julliard) commented about dlls/ntdll/unix/file.c:
-static BOOL is_hidden_file( const UNICODE_STRING *name ) +static BOOL is_hidden_file( const char *name ) { - WCHAR *p, *end; + const char *p, *end;
if (show_dot_files) return FALSE;
- end = p = name->Buffer + name->Length/sizeof(WCHAR); - while (p > name->Buffer && p[-1] == '\\') p--; - while (p > name->Buffer && p[-1] != '\\') p--; - return (p < end && *p == '.'); + end = p = name + strlen( name ); + while (p > name && p[-1] == '/') p--; + while (p > name && p[-1] != '/') p--; + return (p < end && p + 1 != end && p[0] == '.' && p[1] != '\\' && (p[1] != '.' || (p + 2 != end && p[2] != '\\'))); This doesn't make sense, it's using the wrong slashes and shouldn't be necessary in the first place.
-- https://gitlab.winehq.org/wine/wine/-/merge_requests/1148#note_29029
participants (1)
-
Alexandre Julliard (@julliard)