compare_names(): Use case-sensitive comparison v1.2.6
authorEric Biggers <ebiggers3@gmail.com>
Tue, 5 Mar 2013 22:26:21 +0000 (16:26 -0600)
committerEric Biggers <ebiggers3@gmail.com>
Tue, 5 Mar 2013 22:47:54 +0000 (16:47 -0600)
This makes it possible to distinguish files based only on case, which I think is
a good idea because the FUSE filesystem is already case-sensitive, and Windows
at least theoretically supports case-sensitive files.  This also fixes a silent
failure to capture files with names that differ only in case.

src/dentry.c

index e540f70..f7c1a2b 100644 (file)
@@ -371,7 +371,7 @@ void calculate_subdir_offsets(struct wim_dentry *dentry, u64 *subdir_offset_p)
 static int compare_names(const char *name_1, u16 len_1,
                         const char *name_2, u16 len_2)
 {
-       int result = strncasecmp(name_1, name_2, min(len_1, len_2));
+       int result = strncmp(name_1, name_2, min(len_1, len_2));
        if (result) {
                return result;
        } else {