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>
This commit is contained in:
Damjan Jovanovic 2020-11-10 06:49:33 +02:00 committed by Alexandre Julliard
parent 2192d0146a
commit 4e6621f3a6
1 changed files with 4 additions and 4 deletions

View File

@ -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;