-
Notifications
You must be signed in to change notification settings - Fork 633
Closed
Labels
not a bugThis is not a bug, but someone thought it wasThis is not a bug, but someone thought it was
Description
Bug
Path(file_path).exists
return True
even if the file doesn't exist
To Reproduce
Steps to reproduce the behavior:
- install python on Windows 10
- Open python in 'cmd'
- Import the library pathlib
from pathlib import Path
- Give any random file check if it exists
bool(Path("C:\User1").exists)
True
Expected behavior
bool(Path("C:\User1").exists)
False
Works fine if os
used instead of pathlib
import os
os.path.exists("C:\User1")
False
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
- OS: Wndows 10
- Browser any
- Version Microsoft Windows [Version 10.0.18362.356]
Bug reported Issue35692
Metadata
Metadata
Assignees
Labels
not a bugThis is not a bug, but someone thought it wasThis is not a bug, but someone thought it was