wal...@users.sourceforge.net wrote on 10/5/20 5:19 AM:
------------------------------------------------------------------------

Dear Jean-Pierre,

Currently, ntfs-3g works in case sensitive mode. lowntfs-3g is case insensitive but it makes all the filenames lowercase.

Is there a way to make it case insensitive yet preserving, just like how it operates on Windows? I think this is a very common use case especially for those of us who dual boot.


[Copy to ntfs-3g-devel@lists.sourceforge.net please follow up there]

Case insensitivity does not play well in a case sensitive environment.
There are two main situations to examine :

1) when looking up for a file (for open(), stat(), etc.), the kernel asks
the file system for the file, but the file system has no opportunity
to return a name different from the requested one :

If, for instance we have two files (file1 and File2)
[root@optiplex ntfslowprof]# ls -l disk/dir
total 1
-rw-rw-rw- 1 root root 7 Apr 29 09:42 file1
-rw-r--r-- 1 root root 0 Oct  5 08:28 File2

If we make requests for file2, fiLE2, etc, we get what we ask for,
not what is actually recorded :

[root@optiplex ntfslowprof]# ls -li disk/dir/fiLE2
971 -rw-r--r-- 1 root root 0 Oct  5 08:28 disk/dir/fiLE2
[root@optiplex ntfslowprof]# ls -li disk/dir/FILE2
971 -rw-r--r-- 1 root root 0 Oct  5 08:28 disk/dir/FILE2

2) When displaying a directory, the file system can return the
actual file names, for instance (with lowntfs-3g modified for
that purpose) :

[root@optiplex ntfslowprof]# ls -l disk/dir
total 1
-rw-rw-rw- 1 root root 7 Apr 29 09:42 file1
-rw-r--r-- 1 root root 0 Oct  5 08:28 File2

But in that situation, the use of wildcards in the shell is
confusing because the shell is case sensitive :

[root@optiplex ntfslowprof]# ls -li disk/dir/file*
97 -rw-rw-rw- 1 root root 7 Apr 29 09:42 disk/dir/file1
[root@optiplex ntfslowprof]# ls -li disk/dir/Fi*
971 -rw-r--r-- 1 root root 0 Oct  5 08:28 disk/dir/File2
[root@optiplex ntfslowprof]# ls -li disk/dir/*ile*
97 -rw-rw-rw- 1 root root 7 Apr 29 09:42 disk/dir/file1
971 -rw-r--r-- 1 root root 0 Oct  5 08:28 disk/dir/File2

This is why the names are made lowercase when reading
a directory.

Jean-Pierre

Thank you.




_______________________________________________
ntfs-3g-devel mailing list
ntfs-3g-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ntfs-3g-devel

Reply via email to