mesheb82 added the comment: Testing on Python 2.7.12 on through Windows 10 bash (so Linux), I find an inconsistency with the documented statement "If a component is an absolute path, all previous components are thrown away and joining continues from the absolute path component"
>>> os.path.join('dir', 'C:/dir2') 'dir/C:/dir2' To me, the is very similar to the original problem (Windows 10 Python 2.7.13 and 3.6.1): >>> os.path.join('dir1', '/dir2') '/dir2' I would argue that on Windows, '/dir2' is not an absolute path. Testing from cmd and powershell on Windows 10 from `C:` >>> cd /dir2 C:/dir2 I do agree though that is a terrible idea to not respect the second parameter in: os.path.join(absolute_path_or_local_path, absolute_path) I think the question is what is considered an absolute path and does that change depending on the OS? ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue30906> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com