Eryk Sun <eryk...@gmail.com> added the comment:
> 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. ---------- nosy: +eryksun _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue40368> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com