This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author purpleidea
Recipients purpleidea
Date 2009-11-13.17:05:11
SpamBayes Score 6.291144e-06
Marked as misclassified No
Message-id <1258131915.3.0.590815402917.issue7315@psf.upfronthosting.co.za>
In-reply-to
Content
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:

james@home:~$ cd tmp/
james@home:~/tmp$ cat badnormpath.py 
#!/usr/bin/python

import os.path

print '__file__: %s' % __file__
print 'normpath: %s' % os.path.normpath(__file__)

james@home:~/tmp$ ./badnormpath.py 
__file__: ./badnormpath.py
normpath: badnormpath.py
james@home:~/tmp$ ./../tmp/badnormpath.py 
__file__: ./../tmp/badnormpath.py
normpath: ../tmp/badnormpath.py
james@home:~/tmp$
History
Date User Action Args
2009-11-13 17:05:15purpleideasetrecipients: + purpleidea
2009-11-13 17:05:15purpleideasetmessageid: <1258131915.3.0.590815402917.issue7315@psf.upfronthosting.co.za>
2009-11-13 17:05:13purpleidealinkissue7315 messages
2009-11-13 17:05:12purpleideacreate