Eryk Sun added the comment:

Thanks, Steve. I manually added this shell extension as the drop handler for 
Python.File. It's working with non-ANSI filenames, e.g. "αβψδ εφγη ιξκλ μνοπ 
ρστθ ωχυζ.txt" in a Western locale. Also, I was able to drop 939 files from the 
System32 directory, with a total command-line length of 32766 characters. 

However, I ran into heap corruption that crashed Explorer when dropping files 
from "C:\Program Files (x86)\Windows Kits\10\Include\10.0.10586.0\um". I used 
gflags to enable the page heap for Explorer and tracked the problem down to 
FilenameListCchLength[W|A]. It wasn't allocating space for the double quotes 
for paths with spaces in them. So I made the following changes:

FilenameListCchLengthW:

    length += oneLength + (wcschr(pszSource, L' ') ? 3 : 1);

FilenameListCchLengthA:

    length += oneLength + (strchr(pszSource, ' ') ? 3 : 1);

After this I was able to drop 421 files from the above-mentioned Include 
directory, with a total command-line length of 32737 characters.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue27469>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to