nxDumpMerger icon indicating copy to clipboard operation
nxDumpMerger copied to clipboard

File Input displays misleading error with pathnames containing certain characters

Open Lramseyer opened this issue 2 years ago • 1 comments

nxDumpTool can dump files with directory names containing "[" and "]" characters, which are valid in Windows, however, this seems to break the glob.glob(searchPath) in the getInputEntry() function. Instead of returning a file list, it returns an empty array and displays the WrongTypeError() box on screen telling the user that the files are in the wrong format (when they in fact are in a correct format.)

I suggest either adding another popup window to inform the user to fix their directory names, or to tell the user in the existing WrongTypeError() popup.

Note that there may be other characters that cause the glob.glob() function to return an empty array, but I didn't do an exhaustive search.

Lramseyer avatar Feb 10 '23 10:02 Lramseyer

Possible solution:

searchPath = glob.escape(inputPath) + '*'

Istador avatar Apr 05 '23 16:04 Istador