Symlinks already present
Greg Ewing
greg.ewing at canterbury.ac.nz
Thu Sep 3 06:58:08 EDT 2020
On 2/09/20 6:55 am, Eryk Sun wrote:
> According to POSIX (st_dev, st_ino), it's the same directory, yet the
> ".." entry evaluates depending on the path parsing context:
>
> >>> os.lstat('test1/spam/..').st_ino == os.lstat('test1').st_ino
> True
> >>> os.lstat('test2/spam/..').st_ino == os.lstat('test2').st_ino
> True
What happens if you go one level deeper? I.e. is
os.lstat('test1/spam/eggs/../..').st_ino == os.lstat('test1').st_ino
and
os.lstat('test2/spam/eggs/../..').st_ino == os.lstat('test2').st_ino
?
--
Greg
More information about the Python-list
mailing list