[Python-Dev] os.normpath may change the meaning of the path if it contains symbolic links?
nirs at freeshell.org
Fri Dec 2 22:56:15 CET 2005
I'm working on
My patch uses os.path.normpath to simplify the path sent to makedirs as
first step. This eliminates the need to check for os.currdir or other
special case, because normpath already handle all those ugly spacial
cases (and hopefully tested). And of course eliminate possible
pointless system calls.
For example (on Mac OS X):
However, I found this alarming note in the docs:
"It should be understood that this may change the meaning of the path
if it contains symbolic links!"
The function docstring does not contain this note:
"""Normalize path, eliminating double slashes, etc."""
And finally, there is no test for this symbolic link problem.
Anyone has a clue about this?
More information about the Python-Dev