Georg Brandl ge...@python.org 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 rep...@bugs.python.org
http://bugs.python.org/issue7315
New submission from James purplei...@gmail.com:
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$
Georg Brandl ge...@python.org 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
James purplei...@gmail.com 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