Author eryksun
Recipients Drekin, abarry, eryksun, ezio.melotti, paul.moore, steve.dower, tim.golden, vstinner, zach.ware
Date 2016-07-17.08:05:28
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1468742729.09.0.531184874991.issue27469@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2016-07-17 08:05:29eryksunsetrecipients: + eryksun, paul.moore, vstinner, tim.golden, ezio.melotti, zach.ware, Drekin, steve.dower, abarry
2016-07-17 08:05:29eryksunsetmessageid: <1468742729.09.0.531184874991.issue27469@psf.upfronthosting.co.za>
2016-07-17 08:05:29eryksunlinkissue27469 messages
2016-07-17 08:05:28eryksuncreate