[issue7315] os.path.normpath doesn't normalize ../path/something.py

2009-11-14 Thread Georg Brandl
Georg Brandl added the comment: If your current directory is (e.g.) /home/user, then ../xyz will not "bring you back" to it. (xyz/.. would.) -- ___ Python tracker ___ __

[issue7315] os.path.normpath doesn't normalize ../path/something.py

2009-11-13 Thread James
James added the comment: i looked at the source for normpath. i know that it doesn't look at the filesystem. assuming you're not currently sitting at the root directory, in all? cases ../xyz brings you back to where you started. we expect normpath to clean up a path string, collapsing '../' (a

[issue7315] os.path.normpath doesn't normalize ../path/something.py

2009-11-13 Thread Georg Brandl
Georg Brandl added the comment: normpath() doesn't look at the file system. It cannot know that your current directory is ~/tmp, so it cannot know that . and ../tmp are the same directory. -- nosy: +georg.brandl resolution: -> wont fix status: open -> closed _

[issue7315] os.path.normpath doesn't normalize ../path/something.py

2009-11-13 Thread James
New submission from James : os.path.normpath doesn't normalize paths that start with ../ you would expect the final output line in the secpnd run to read: "normpath: badnormpath.py" instead of: "normpath: ../tmp/badnormpath.py" example: ja...@home:~$ cd tmp/ ja...@home:~/tmp$ cat badnormpath.py