Change by Joe Pamer :
--
keywords: +patch
pull_requests: +9157
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issue34944>
___
___
Python-
New submission from Joe Pamer :
The fix for issue 32557 updated os__getdiskusage_impl to use _dirnameW for
obtaining the parent directory of a file. This would cause a regression if the
path exceeded 260 characters, since _dirnameW currently returns -1 if given a
path >= MAX_PATH in len
Joe Pamer added the comment:
Awesome - thanks, Steve - this is all super helpful! If you're cool with it I'd
like to stick to using _dirnameW for now, and then follow up with another set
of PRs for the fixes you've recommended.
--
___
Joe Pamer added the comment:
Just to loop back, I updated the PR to avoid MAX_PATH and only allocate in the
"not a directory" case. Thanks for getting back to me so quickly!
One question, though, is that it *does* seem like MAX_PATH is still referenced
in several places in pos
Joe Pamer added the comment:
Got it - thanks! That sounds good to me, so I'll take a look at how other
functions are working around MAX_PATH and update the diff to also avoid the
copy when possible.
--
___
Python tracker
<https://bugs.py
Joe Pamer added the comment:
Hi!
I decided to try fixing this one as a way to get acquainted with the code base.
I went ahead and updated the backing NT C function, but please let me know if
you'd prefer I update disk_usage as proposed.
Thanks!
--
nosy: +jo