[issue35692] pathlib.Path.exists() on non-existent drive raises WinError instead of returning False

2019-01-08 Thread Jordan Hueckstaedt


New submission from Jordan Hueckstaedt :

Tested in 3.7.0 on windows 10.
This looks related to https://bugs.python.org/issue22759


>>> import pathlib
>>> pathlib.Path(r"E:\Whatever\blah.txt").exists()  # This drive doesn't exist
Traceback (most recent call last):
  File "", line 1, in 
  File 
"C:\Users\jordanhu\AppData\Local\Continuum\anaconda2\envs\py3\lib\pathlib.py", 
line 1318, in exists
self.stat()
  File 
"C:\Users\jordanhu\AppData\Local\Continuum\anaconda2\envs\py3\lib\pathlib.py", 
line 1140, in stat
return self._accessor.stat(self)
PermissionError: [WinError 21] The device is not ready: 'E:\\Whatever\\blah.txt'
>>> pathlib.Path(r"C:\Whatever\blah.txt").exists() # This drive exists
False

--
messages: 333275
nosy: Jordan Hueckstaedt
priority: normal
severity: normal
status: open
title: pathlib.Path.exists() on non-existent drive raises WinError instead of 
returning False
type: behavior
versions: Python 3.7

___
Python tracker 
<https://bugs.python.org/issue35692>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue36621] shutil.rmtree follows junctions on windows

2019-04-12 Thread Jordan Hueckstaedt


New submission from Jordan Hueckstaedt :

shutil.rmtree follows junctions / reparse points on windows and will delete 
files in the target link directory.

--
components: IO, Windows
messages: 340111
nosy: Jordan Hueckstaedt, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: shutil.rmtree follows junctions on windows
versions: Python 2.7

___
Python tracker 
<https://bugs.python.org/issue36621>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com