plyer icon indicating copy to clipboard operation
plyer copied to clipboard

Switch to MaxFile arg to increase Windows filechooser buffer

Open Xnot opened this issue 1 year ago • 0 comments

In d87c446, a workaround to long filenames crashing the Windows filechooser was added by appending \x00 to the File arg. This works because pywin32 takes the max of MaxFile and the length of File as the buffer size. However it would be more appropriate to directly use the MaxFile arg, as that's its intended purpose. Additionally, this will allow users to pass the buffer_size parameter if they are using really long file names and wish to override the buffer size.

Xnot avatar Nov 01 '23 23:11 Xnot