It looks like in bug 1435 they wanted to avoid triggering of error if no more files found. But could not understand why they wanted to avoid triggering of error when the specified filename does not exists. In MS windows if File Not found, then it returns error. So we could satisfy both by just doing the following check:
if (le != ERROR_NO_MORE_FILES) return LB_ERR;
So the above condition triggers error for all the error conditions except for ERROR_NO_MORE_FILES.
Krishna
-----Original Message----- From: Alexandre Julliard [mailto:julliard@winehq.org] Sent: Tuesday, June 22, 2004 2:54 PM To: Krishna Murthy Cc: 'Dimitrie O. Paun'; wine-devel@winehq.org Subject: Re: LISTBOX_Directory() returns LB_OKAY for invalid directory / f ilen ame
Krishna Murthy Krishna.Murthy@guptaworldwide.com writes:
Yesssss! got it, stupid mistake.... It should be... if ((le == ERROR_NO_MORE_FILES) || (le == ERROR_FILE_NOT_FOUND)) return LB_ERR;
That makes more sense, but it still looks wrong, I don't see why you would ignore all other errors. I suspect what you are really trying to do is to revert the change in rev 1.94, but this causes other problems (cf. bug 1435). I think you'll have to write a regression test for that one.
-- Alexandre Julliard julliard@winehq.org
Krishna Murthy Krishna.Murthy@guptaworldwide.com writes:
It looks like in bug 1435 they wanted to avoid triggering of error if no more files found. But could not understand why they wanted to avoid triggering of error when the specified filename does not exists. In MS windows if File Not found, then it returns error. So we could satisfy both by just doing the following check:
if (le != ERROR_NO_MORE_FILES) return LB_ERR;
So the above condition triggers error for all the error conditions except for ERROR_NO_MORE_FILES.
Which is exactly what the code looked like before the fix for bug 1435, so you will just reintroduce the bug. This needs more investigating...