<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<div class="moz-cite-prefix">Hi, Alexander.<br>
Fix looks fine.<br>
On 01.08.2013 21:03, Alexander Zvegintsev wrote:<br>
</div>
<blockquote cite="mid:51FA94FD.7060603@oracle.com" type="cite">
<meta http-equiv="content-type" content="text/html;
charset=ISO-8859-1">
Hello, <br>
<br>
Could you please review a fix for the following issue:<br>
<a moz-do-not-send="true" class="moz-txt-link-freetext"
href="http://bugs.sun.com/view_bug.do?bug_id=8021943">http://bugs.sun.com/view_bug.do?bug_id=8021943</a><br>
<br>
The fix is available at:<br>
<a moz-do-not-send="true" class="moz-txt-link-freetext"
href="http://cr.openjdk.java.net/%7Eserb/8021943/webrev.00/">http://cr.openjdk.java.net/~serb/8021943/webrev.00/</a><br>
<br>
lpstrFile should be treated as double NULL terminated (DNT) string
only when OFN_ALLOWMULTISELECT flag is set.<br>
<a moz-do-not-send="true" class="moz-txt-link-freetext"
href="http://msdn.microsoft.com/en-us/library/windows/desktop/ms646839%28v=vs.85%29.aspx">http://msdn.microsoft.com/en-us/library/windows/desktop/ms646839%28v=vs.85%29.aspx</a><br>
<blockquote type="cite">If the <strong>OFN_ALLOWMULTISELECT</strong>
flag is set and the user selects multiple files, the buffer
contains the current directory followed by the file names of the
selected files. For Explorer-style dialog boxes, the directory
and file name strings are <strong>NULL</strong> separated, with
an extra <strong>NULL</strong> character after the last file
name. </blockquote>
Currently we check length of a lpstrFile with GetBufferLength()
which treats \0\0 as an end of a string. <br>
It works nice, unless we call setFile() with a filename longer
than a path of a saved file (in single-select mode).<br>
In single-select mode lpstrFile string ends with single \0, and
GetBufferLength() fails to find correct length and we pass
\0-separated buffer to <br>
WFileDialogPeer.handleSelected() which will be treated as
multi-select mode.<br>
<br>
<pre class="moz-signature" cols="72">--
Thanks,
Alexander.</pre>
</blockquote>
<br>
<br>
<pre class="moz-signature" cols="72">--
Best regards, Sergey. </pre>
</body>
</html>