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 eryksun, saschanaz
Date 2020-04-22.22:00:35
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1587592835.92.0.407707188545.issue40368@roundup.psfhosted.org>
In-reply-to
Content
> This behavior is inconsistent with `os.path.abspath` where it always 
> returns lowercased drive letter, 

ntpath.abspath calls GetFullPathNameW, which generally preserves the input case of the device/drive component. But it doesn't always preserve drive-letter case. In particular, a drive-relative path gets resolved with the upper-case drive letter:

    >>> os.path.abspath('c:spam')
    'C:\\Temp\\spam'

That's a corner case that maybe needs to be addressed for ntpath.abspath. However, regarding ntpath.realpath, I see no reason for it to preserve the input case. To the contrary, it should always make a best effort to normalize the input path to use the real device and component names and replace 8.3 short names with long names.

> and also causes a failure in Gecko build script: 
> https://bugzilla.mozilla.org/show_bug.cgi?id=1628726

IMO, the bug there is using a case-insensitive path as a key without first case folding the string.
History
Date User Action Args
2020-04-22 22:00:35eryksunsetrecipients: + eryksun, saschanaz
2020-04-22 22:00:35eryksunsetmessageid: <1587592835.92.0.407707188545.issue40368@roundup.psfhosted.org>
2020-04-22 22:00:35eryksunlinkissue40368 messages
2020-04-22 22:00:35eryksuncreate