[issue5117] os.path.relpath problem with root drive directory on windows

2009-01-31 Thread Hirokazu Yamamoto
Changes by Hirokazu Yamamoto : -- versions: +Python 2.7, Python 3.0, Python 3.1 ___ Python tracker ___ ___ Python-bugs-list mailing lis

[issue5117] os.path.relpath problem with root drive directory on windows

2009-01-31 Thread Hirokazu Yamamoto
Changes by Hirokazu Yamamoto : ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/pyt

[issue5117] os.path.relpath problem with root drive directory on windows

2009-01-31 Thread Hirokazu Yamamoto
Changes by Hirokazu Yamamoto : Removed file: http://bugs.python.org/file12906/fix_relpath_v2.patch ___ Python tracker ___ ___ Python-bugs-list

[issue5117] os.path.relpath problem with root drive directory on windows

2009-01-31 Thread Hirokazu Yamamoto
Changes by Hirokazu Yamamoto : Removed file: http://bugs.python.org/file12904/fix_relpath.patch ___ Python tracker ___ ___ Python-bugs-list mai

[issue5117] os.path.relpath problem with root drive directory on windows

2009-01-31 Thread Hirokazu Yamamoto
Hirokazu Yamamoto added the comment: I hope this works. Added file: http://bugs.python.org/file12907/fix_relpath_v3.patch ___ Python tracker ___ _

[issue5117] os.path.relpath problem with root drive directory on windows

2009-01-31 Thread Hirokazu Yamamoto
Hirokazu Yamamoto added the comment: It seems that there is still problem. >>> ntpath.relpath("//whiterab-c2znlh/foo/", "//whiterab-c2znlh/bar/") '..\\foo' This should raise ValueError because "//whiterab-c2znlh/foo" is UNC root prefix (like "e:" for normal path) not "//whiterab-c2znlh" AFAIK.

[issue5117] os.path.relpath problem with root drive directory on windows

2009-01-31 Thread Hirokazu Yamamoto
Changes by Hirokazu Yamamoto : Added file: http://bugs.python.org/file12906/fix_relpath_v2.patch ___ Python tracker ___ ___ Python-bugs-list ma

[issue5117] os.path.relpath problem with root drive directory on windows

2009-01-31 Thread Hirokazu Yamamoto
Changes by Hirokazu Yamamoto : Removed file: http://bugs.python.org/file12905/fix_relpath_v2.patch ___ Python tracker ___ ___ Python-bugs-list

[issue5117] os.path.relpath problem with root drive directory on windows

2009-01-31 Thread Hirokazu Yamamoto
Hirokazu Yamamoto added the comment: If it is better _abspath_split("/") to return [""] instead of [] for consistency, "fix_relpath_v2.patch" might be better. (There is no difference for relpath behavior though) Added file: http://bugs.python.org/file12905/fix_relpath_v2.patch

[issue5117] os.path.relpath problem with root drive directory on windows

2009-01-31 Thread Hirokazu Yamamoto
Hirokazu Yamamoto added the comment: I hope attached patch will fix this bug. -- keywords: +patch Added file: http://bugs.python.org/file12904/fix_relpath.patch ___ Python tracker __

[issue5117] os.path.relpath problem with root drive directory on windows

2009-01-31 Thread eliben
eliben added the comment: The problem is with these lines: start_list = abspath(start).split(sep) path_list = abspath(path).split(sep) In case of 'd:\', the split returns two elements, the second empty. ___ Python tracker

[issue5117] os.path.relpath problem with root drive directory on windows

2009-01-31 Thread Hirokazu Yamamoto
Hirokazu Yamamoto added the comment: About this, >But this isn't: >relpath(r'd:\jho', r'd:\\') >=> '..\jho' Same happens on posixpath. from posixpath import relpath print relpath(r'/abc', r'/') #=> ../abc I'll look at the code. -- nosy: +ocean-city _

[issue5117] os.path.relpath problem with root drive directory on windows

2009-01-30 Thread eliben
New submission from eliben : This is correct: relpath(r'd:\abc\jho', r'd:\abc') => 'jho' But this isn't: relpath(r'd:\jho', r'd:\\') => '..\jho' Neither is this: relpath(r'd:\jho', r'd:') => '..\..\..\jho' -- components: Library (Lib) messages: 80860 nosy: eliben severity: normal stat