Comment 2 for bug 236468

Revision history for this message
Thomas Meire (blackskad) wrote :

If I'm not mistaken, /proc/pid/cwd will point to ~/Desktop/testfolder/, which in turn points to ~/testfolder/. To resolve the cwd-symlink, we use os.path.realpath. But this function resolves all symlinks it encounters, and will thus resolve the cwd-symlink to ~/testfolder/ instead of ~/Desktop/testfolder/.
So another solution would be to find a function which follows a symlink for only one level (cwd-symlink ->~/Desktop/testfolder/).