Right. This is the same issue. mIRC was catering for it by checking if the returned filename is a directory and changing it to $null, which worked fine for $sfile(). However, with $msfile(), the Windows File dialog is doing the same thing, except it is returning a list of files. In this case, it returns a list that includes "C:\Windows\Font" as a filename, which it isn't.
If in $msfile() I select the Windows "Font" folder and two other normal files, the file dialog will return three items in the files list. Two are valid filenames and the third one (Fonts) is not valid.
How would you like this to be handled? There is obviously an error, however two of the items are valid filenames.
Would you like $msfile() to return an empty file list? and set $sfstate to "error"? Or to just remove "Fonts" from the returned file list and only return the filenames?
What if "Fonts" is the only item selected in the $msfile() dialog? Should $sfstate show an error?