When path is too long - mirc resets it to $mircdir
//return $findfile($+(C:\,$str(z,4096)),*,0,0,echo -a $1-)
returns files from $mircdir
and just where do you think mIRC should be returning it to under those circumstances?
The whole 4096 limit is a bit odd, since in Windows environments the limit is generally 260 chars for the full path length.
MSDN - Maximum Path Length Limitation
My question still stands, irrelevant as to what the actual length of the path is, so long as it exceeds whatever the maximum length happens to be.
It should fail with an exceeds max path error. Returning files from a folder other than the one specified, even if that folder is an invalid one, is clearly not desireable.
Actually I beleive mIRC ignores paths longer than 260 characters. This error is the result of mIRC's 4KB limit on string length.