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.

classification
Title: Results from os.path.islink and os.stat S_ISLNK do not match
Type: behavior Stage:
Components: None Versions: Python 2.5
process
Status: closed Resolution: not a bug
Dependencies: Superseder:
Assigned To: Nosy List: christian.heimes, npatters
Priority: normal Keywords:

Created on 2008-12-05 22:12 by npatters, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
demo.txt npatters, 2008-12-05 22:12 Interactive session output
Messages (2)
msg77079 - (view) Author: Nicholas Patterson (npatters) Date: 2008-12-05 22:12
See attached file, os.path.islink correctly identifies symlinks as 
symlinks, but S_ISLNK is not reporting them as such.
msg77080 - (view) Author: Christian Heimes (christian.heimes) * (Python committer) Date: 2008-12-05 22:14
The behavior is correct. You want os.lstat, not os.stat.
http://docs.python.org/library/os.html#os.lstat
History
Date User Action Args
2022-04-11 14:56:42adminsetgithub: 48803
2008-12-05 22:14:12christian.heimessetstatus: open -> closed
resolution: not a bug
messages: + msg77080
nosy: + christian.heimes
2008-12-05 22:12:26npatterscreate