Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Results from os.path.islink and os.stat S_ISLNK do not match #48803

Closed
npatters mannequin opened this issue Dec 5, 2008 · 2 comments
Closed

Results from os.path.islink and os.stat S_ISLNK do not match #48803

npatters mannequin opened this issue Dec 5, 2008 · 2 comments
Labels
type-bug An unexpected behavior, bug, or error

Comments

@npatters
Copy link
Mannequin

npatters mannequin commented Dec 5, 2008

BPO 4553
Nosy @tiran
Files
  • demo.txt: Interactive session output
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = None
    closed_at = <Date 2008-12-05.22:14:12.581>
    created_at = <Date 2008-12-05.22:12:26.887>
    labels = ['type-bug', 'invalid']
    title = 'Results from os.path.islink and os.stat S_ISLNK do not match'
    updated_at = <Date 2008-12-05.22:14:12.567>
    user = 'https://bugs.python.org/npatters'

    bugs.python.org fields:

    activity = <Date 2008-12-05.22:14:12.567>
    actor = 'christian.heimes'
    assignee = 'none'
    closed = True
    closed_date = <Date 2008-12-05.22:14:12.581>
    closer = 'christian.heimes'
    components = ['None']
    creation = <Date 2008-12-05.22:12:26.887>
    creator = 'npatters'
    dependencies = []
    files = ['12245']
    hgrepos = []
    issue_num = 4553
    keywords = []
    message_count = 2.0
    messages = ['77079', '77080']
    nosy_count = 2.0
    nosy_names = ['christian.heimes', 'npatters']
    pr_nums = []
    priority = 'normal'
    resolution = 'not a bug'
    stage = None
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue4553'
    versions = ['Python 2.5']

    @npatters
    Copy link
    Mannequin Author

    npatters mannequin commented Dec 5, 2008

    See attached file, os.path.islink correctly identifies symlinks as
    symlinks, but S_ISLNK is not reporting them as such.

    @npatters npatters mannequin added the type-bug An unexpected behavior, bug, or error label Dec 5, 2008
    @tiran
    Copy link
    Member

    tiran commented Dec 5, 2008

    The behavior is correct. You want os.lstat, not os.stat.
    http://docs.python.org/library/os.html#os.lstat

    @tiran tiran closed this as completed Dec 5, 2008
    @tiran tiran added the invalid label Dec 5, 2008
    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    type-bug An unexpected behavior, bug, or error
    Projects
    None yet
    Development

    No branches or pull requests

    1 participant