New submission from Steve Dower <steve.do...@python.org>:

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 <rep...@bugs.python.org>
<https://bugs.python.org/issue38186>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to