From: David Kahurani k.kahurani@gmail.com
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=54939 Signed-off-by: David Kahurani k.kahurani@gmail.com --- dlls/ntdll/unix/file.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/dlls/ntdll/unix/file.c b/dlls/ntdll/unix/file.c index 0263d53716b..b1972d678c2 100644 --- a/dlls/ntdll/unix/file.c +++ b/dlls/ntdll/unix/file.c @@ -1294,19 +1294,19 @@ static BOOLEAN get_dir_case_sensitivity( const char *dir ) * * Check if the specified file should be hidden based on its unix path and the show dot files option. */ -static BOOL is_hidden_file( const char *name ) +static BOOL is_hidden_file( const char *path ) { const char *p;
if (show_dot_files) return FALSE;
- p = name + strlen( name ); - while (p > name && p[-1] == '/') p--; - while (p > name && p[-1] != '/') p--; + p = path + strlen( path ); + while (p > path && p[-1] == '/') p--; + while (p > path && p[-1] != '/') p--; if (*p++ != '.') return FALSE; if (!*p || *p == '/') return FALSE; /* "." directory */ - if (*p++ != '.') return FALSE; - if (!*p || *p == '/') return FALSE; /* ".." directory */ + if (*p++ == '.' && (!*p || *p == '/')) return FALSE; /* ".." directory */ + return TRUE; }