[PATCH 1/6] ntdll: fix wrong return values in get_dir_case_sensitivity_stat()
Damjan Jovanovic
damjan.jov at gmail.com
Mon Nov 9 22:49:33 CST 2020
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 at gmail.com>
---
dlls/ntdll/unix/file.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
-------------- next part --------------
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;
More information about the wine-devel
mailing list