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 edemaine
Recipients
Date 2003-07-09.12:38:08
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
Cygwin allows mounting directories within other mount
points.  This can cause os.path.realpath to expand some
symlinks that it shouldn't.  For example:

$ cd /
$ mkdir X
$ mkdir X/Y
$ ln -s X Z
$ mount C:/ /Z/Y
$ ls Z/Y
[...contents of C:\...]
$ ls X/Y
[empty directory]

$ python -c "import os; print os.path.realpath('Z/Y')"
/X/Y
[bad because /X/Y is empty yet the original Z/Y has files]

In Cygwin, the correct answer would be either 'C:\\' or
'/cygdrive/c/'.

Conceivably this problem can happen in UNIces other
than Cygwin.  It would be rather annoying to fix,
because it would require looking at the mount table. 
But I thought I would mention it anyway...
History
Date User Action Args
2007-08-23 14:14:46adminlinkissue768419 messages
2007-08-23 14:14:46admincreate