This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author eryksun
Recipients bstorm, eryksun, federico2, gaborjbernat, miikama, ned.deily, paul.moore, steve.dower, tim.golden, vinay.sajip, zach.ware
Date 2020-08-26.08:13:48
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1598429629.25.0.0819478686096.issue37369@roundup.psfhosted.org>
In-reply-to
Content
Case-sensitive file access is potentially possible with FILE_FLAG_POSIX_SEMANTICS (CreateFileW) and FIND_FIRST_EX_CASE_SENSITIVE (FindFirstFileExW). These flags make the API omit the object-manager flag OBJ_CASE_INSENSITIVE in the NtCreateFile or NtOpenFile system call. That said, since Windows XP these API flags are usually ignored because the kernel object manager has a default-enabled global flag that makes it always use OBJ_CASE_INSENSITIVE for object types that are registered as case-insensitive, such as device objects. The global flag is configured as the value "obcaseinsensitive" in "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\kernel".

A filesystem may elect to ignore the OBJ_CASE_INSENSITIVE flag, though it's not particularly elegant. In Windows 10, NTFS ignores the OBJ_CASE_INSENSITIVE flag if the parent directory is flagged as case-sensitive via NtSetInformationFile: FileCaseSensitiveInformation [1], which can be set by WSL or fsutil.exe. This setting should be avoided for directories that are used by Windows programs. An example issue is the way shells use the PATHEXT environment variable to find a file when the extension is omitted. Typically each extension in PATHEXT gets appended to the base name and checked via FindFirstFileW or GetFileAttributesW. But, for example, checking for "spam.BAT" will fail in a case-sensitive directory if the extension is actually ".bat", ".Bat", etc.

---

[1] https://docs.microsoft.com/en-us/windows-hardware/drivers/ddi/ntifs/ns-ntifs-_file_case_sensitive_information
History
Date User Action Args
2020-08-26 08:13:49eryksunsetrecipients: + eryksun, paul.moore, vinay.sajip, tim.golden, ned.deily, zach.ware, steve.dower, gaborjbernat, bstorm, miikama, federico2
2020-08-26 08:13:49eryksunsetmessageid: <1598429629.25.0.0819478686096.issue37369@roundup.psfhosted.org>
2020-08-26 08:13:49eryksunlinkissue37369 messages
2020-08-26 08:13:48eryksuncreate