Skip to content

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

Closed

Description

@npatters
mannequin
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']

    Activity

    1. npatters commented on Dec 5, 2008

      npattersmannequin
      MannequinAuthor

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

    2. tiran commented on Dec 5, 2008

      @tiran
      Member

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

    3. transferred this issue fromon Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

    Metadata

    Metadata

    Assignees

    No one assigned

      Labels

      type-bugAn unexpected behavior, bug, or error

      Projects

      No projects

        Milestone

        No milestone

        Relationships

        None yet

        Development

        No branches or pull requests

        Issue actions