<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<META NAME="Generator" CONTENT="MS Exchange Server version 5.5.2653.12">
<TITLE>RE: LISTBOX_Directory() returns LB_OKAY for invalid directory / f ilen ame</TITLE>
</HEAD>
<BODY>

<P><FONT SIZE=2>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:</FONT></P>

<P><FONT SIZE=2>&gt; if (le != ERROR_NO_MORE_FILES) return LB_ERR; </FONT>
</P>

<P><FONT SIZE=2>So the above condition triggers error for all the error conditions except for ERROR_NO_MORE_FILES.</FONT>
</P>

<P><FONT SIZE=2>Krishna</FONT>
</P>

<P><FONT SIZE=2>-----Original Message-----</FONT>
<BR><FONT SIZE=2>From: Alexandre Julliard [<A HREF="mailto:julliard@winehq.org">mailto:julliard@winehq.org</A>] </FONT>
<BR><FONT SIZE=2>Sent: Tuesday, June 22, 2004 2:54 PM</FONT>
<BR><FONT SIZE=2>To: Krishna Murthy</FONT>
<BR><FONT SIZE=2>Cc: 'Dimitrie O. Paun'; wine-devel@winehq.org</FONT>
<BR><FONT SIZE=2>Subject: Re: LISTBOX_Directory() returns LB_OKAY for invalid directory / f ilen ame</FONT>
</P>

<P><FONT SIZE=2>Krishna Murthy &lt;Krishna.Murthy@guptaworldwide.com&gt; writes:</FONT>
</P>

<P><FONT SIZE=2>&gt; Yesssss! got it, stupid mistake.... </FONT>
<BR><FONT SIZE=2>&gt; It should be...</FONT>
<BR><FONT SIZE=2>&gt; if ((le == ERROR_NO_MORE_FILES) || (le == ERROR_FILE_NOT_FOUND)) </FONT>
<BR><FONT SIZE=2>&gt; return LB_ERR;</FONT>
</P>

<P><FONT SIZE=2>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.</FONT></P>

<P><FONT SIZE=2>--</FONT>
<BR><FONT SIZE=2>Alexandre Julliard</FONT>
<BR><FONT SIZE=2>julliard@winehq.org</FONT>
</P>

</BODY>
</HTML>