Skip to content

find_library can return directories instead of files #49125

Closed

Description

@rfk
mannequin
BPO 4875
Nosy @theller

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 = 'https://github.com/theller'
closed_at = <Date 2009-05-05.19:53:43.235>
created_at = <Date 2009-01-08.00:43:35.081>
labels = ['ctypes', 'type-bug']
title = 'find_library can return directories instead of files'
updated_at = <Date 2009-05-05.19:53:43.233>
user = 'https://bugs.python.org/rfk'

bugs.python.org fields:

activity = <Date 2009-05-05.19:53:43.233>
actor = 'theller'
assignee = 'theller'
closed = True
closed_date = <Date 2009-05-05.19:53:43.235>
closer = 'theller'
components = ['ctypes']
creation = <Date 2009-01-08.00:43:35.081>
creator = 'rfk'
dependencies = []
files = []
hgrepos = []
issue_num = 4875
keywords = []
message_count = 2.0
messages = ['79385', '87276']
nosy_count = 2.0
nosy_names = ['theller', 'rfk']
pr_nums = []
priority = 'normal'
resolution = 'fixed'
stage = None
status = 'closed'
superseder = None
type = 'behavior'
url = 'https://bugs.python.org/issue4875'
versions = ['Python 2.6', 'Python 3.0', 'Python 3.1', 'Python 2.7']

Activity

  1. rfk commented on Jan 8, 2009

    rfkmannequin
    MannequinAuthor

    On win32, ctypes.util.find_library uses os.path.exists() to check for
    potential library files. This means it is quite happy to return a
    directory instead of a file, if one happens to exist with the
    appropriate name somewhere in the search path. Can this please be
    changed to use os.path.isfile() instead of os.path.exists()?

  2. added
    type-bug
    on Jan 8, 2009
  3. theller commented on May 5, 2009

    @theller

    Fixed in trunk (rev 72352), release26-maint (rev 72353), py3k (rev
    72354), and release30-maint (rev 72355).

  4. 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

Labels

topic-ctypestype-bug

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions