Author eryksun
Recipients eryksun, paul.moore, steve.dower, tim.golden, zach.ware
Date 2018-07-23.10:26:23
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1532341583.35.0.56676864532.issue34195@psf.upfronthosting.co.za>
In-reply-to
Content
os__getvolumepathname_impl in Modules/posixmodule.c doesn't directly modify the case. So that leaves WinAPI GetVolumePathNameW as the culprit, but, according to the following test, apparently not in Windows 10.0.17134:

    kernel32 = ctypes.WinDLL('kernel32', use_last_error=True)
    path = (ctypes.c_wchar * 4)()
    kernel32.GetVolumePathNameW(r'c:\windows', path, 4)
    
    >>> path.value
    'c:\\'

On a related note, nowadays we need to be careful to only use a case-insensitive comparison for drive letters and other device names. On account of WSL, recent versions of NTFS support flagging directories as case sensitive [1][2]. For example, a volume may be mounted using a junction in a case-sensitive directory. 

[1]: https://blogs.msdn.microsoft.com/commandline/2018/02/28/per-directory-case-sensitivity-and-wsl
[2]: https://blogs.msdn.microsoft.com/commandline/2018/06/14/improved-per-directory-case-sensitivity-support-in-wsl
History
Date User Action Args
2018-07-23 10:26:23eryksunsetrecipients: + eryksun, paul.moore, tim.golden, zach.ware, steve.dower
2018-07-23 10:26:23eryksunsetmessageid: <1532341583.35.0.56676864532.issue34195@psf.upfronthosting.co.za>
2018-07-23 10:26:23eryksunlinkissue34195 messages
2018-07-23 10:26:23eryksuncreate