Module: wine Branch: master Commit: 4e6621f3a65636d7db53a34c897013445dea79fb URL: https://source.winehq.org/git/wine.git/?a=commit;h=4e6621f3a65636d7db53a34c8...
Author: Damjan Jovanovic damjan.jov@gmail.com Date: Tue Nov 10 06:49:33 2020 +0200
ntdll: Fix wrong return values in get_dir_case_sensitivity_stat().
It should be returning TRUE (= case sensitive) on failure as case sensitive is the safe assumption, but some returns are FALSE on failure and even TRUE when case insensitive. Fix that.
Signed-off-by: Damjan Jovanovic damjan.jov@gmail.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
dlls/ntdll/unix/file.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/dlls/ntdll/unix/file.c b/dlls/ntdll/unix/file.c index d6a7b0c1550..c8531bb4f93 100644 --- a/dlls/ntdll/unix/file.c +++ b/dlls/ntdll/unix/file.c @@ -1122,7 +1122,7 @@ static BOOLEAN get_dir_case_sensitivity_stat( const char *dir ) #if defined(__APPLE__) || defined(__FreeBSD__) || defined(__FreeBSD_kernel__) struct statfs stfs;
- if (statfs( dir, &stfs ) == -1) return FALSE; + if (statfs( dir, &stfs ) == -1) return TRUE; /* Assume these file systems are always case insensitive on Mac OS. * For FreeBSD, only assume CIOPFS is case insensitive (AFAIK, Mac OS * is the only UNIX that supports case-insensitive lookup). @@ -1159,12 +1159,12 @@ static BOOLEAN get_dir_case_sensitivity_stat( const char *dir ) #elif defined(__NetBSD__) struct statvfs stfs;
- if (statvfs( dir, &stfs ) == -1) return FALSE; + if (statvfs( dir, &stfs ) == -1) return TRUE; /* Only assume CIOPFS is case insensitive. */ if (strcmp( stfs.f_fstypename, "fusefs" ) || strncmp( stfs.f_mntfromname, "ciopfs", 5 )) - return TRUE; - return FALSE; + return FALSE; + return TRUE;
#elif defined(__linux__) BOOLEAN sens = TRUE;