You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
find_library can return directories instead of files #49125
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=<Date2009-05-05.19:53:43.235>created_at=<Date2009-01-08.00:43:35.081>labels= ['ctypes', 'type-bug']
title='find_library can return directories instead of files'updated_at=<Date2009-05-05.19:53:43.233>user='https://bugs.python.org/rfk'
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()?
Activity
rfk commentedon Jan 8, 2009
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()?
theller commentedon May 5, 2009
Fixed in trunk (rev 72352), release26-maint (rev 72353), py3k (rev
72354), and release30-maint (rev 72355).