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

pathlib is_dir gives wrong result for mounted USB flash drive #104806

Closed
bobjalex opened this issue May 23, 2023 · 4 comments
Closed

pathlib is_dir gives wrong result for mounted USB flash drive #104806

bobjalex opened this issue May 23, 2023 · 4 comments
Labels
3.12 bugs and security fixes 3.13 bugs and security fixes OS-windows topic-pathlib type-bug An unexpected behavior, bug, or error

Comments

@bobjalex
Copy link

Bug report

A clear and concise description of what the bug is.
Include a minimal, reproducible example (https://stackoverflow.com/help/minimal-reproducible-example), if possible.

Your environment

  • CPython versions tested on:
  • Operating system and architecture:
@bobjalex bobjalex added the type-bug An unexpected behavior, bug, or error label May 23, 2023
@bobjalex
Copy link
Author

I'm having trouble entering data into the report proper, so entering it in a comment:
CPython version 3.12b1
My environment: Windows 11 laptop 64bit

Using pathlib.is_dir for a directory on a mounted USB drive answers False, but os.path.isdir gives the correct answer: True. pathlib.is_dir works fine for the C:\ drive.

Attached is a little program that shows the problem.
is_dir.py.txt

@bobjalex
Copy link
Author

Oops, I left this out:
My output from the attached program:

python is_dir.py
using os.path: True
using pathlib: False
using os.path: True
using pathlib: True

@eryksun
Copy link
Contributor

eryksun commented May 23, 2023

This issue should be resolved by fixing gh-104820.

@eryksun eryksun added OS-windows 3.12 bugs and security fixes 3.13 bugs and security fixes labels May 23, 2023
@zooba
Copy link
Member

zooba commented May 24, 2023

Yep, can see this was reported first, but I've already attached the fix to #104820, so closing this as a duplicate.

@zooba zooba closed this as not planned Won't fix, can't repro, duplicate, stale May 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.12 bugs and security fixes 3.13 bugs and security fixes OS-windows topic-pathlib type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

No branches or pull requests

4 participants