[issue38186] Use FindFirstFile in ntpath.realpath() when access is denied

2019-09-16 Thread Steve Dower


Steve Dower  added the comment:

See issue38081 and PR 16156 for related discussion and changes.

--

___
Python tracker 

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



[issue38186] Use FindFirstFile in ntpath.realpath() when access is denied

2019-09-16 Thread Steve Dower


New submission from Steve Dower :

There remains a case in ntpath.realpath() where a (handled) ERROR_ACCESS_DENIED 
or ERROR_SHARING_VIOLATION will break out of traversing a series of paths.

However, in this case (in os.stat(), for example), we could request the real 
name of the file from the directory using FindFirstFileW. This would correct 
the case and remove any path shortening (e.g. LONGFI~1 to LongFilename) without 
needing to directly access the file.

--
components: Windows
messages: 352543
nosy: eryksun, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: Use FindFirstFile in ntpath.realpath() when access is denied
versions: Python 3.8, Python 3.9

___
Python tracker 

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