src/windows/native/sun/windows/awt_FileDialog.cpp

Print this page

        

*** 370,380 **** VERIFY(::SetCurrentDirectory(currentDirectory)); // Report result to peer. if (result) { ! jint length = (jint)GetBufferLength(ofn.lpstrFile, ofn.nMaxFile); jcharArray jnames = env->NewCharArray(length); env->SetCharArrayRegion(jnames, 0, length, (jchar*)ofn.lpstrFile); env->CallVoidMethod(peer, AwtFileDialog::handleSelectedMID, jnames); env->DeleteLocalRef(jnames); --- 370,382 ---- VERIFY(::SetCurrentDirectory(currentDirectory)); // Report result to peer. if (result) { ! jint length = multipleMode ! ? (jint)GetBufferLength(ofn.lpstrFile, ofn.nMaxFile) ! : (jint)_tcslen(ofn.lpstrFile); jcharArray jnames = env->NewCharArray(length); env->SetCharArrayRegion(jnames, 0, length, (jchar*)ofn.lpstrFile); env->CallVoidMethod(peer, AwtFileDialog::handleSelectedMID, jnames); env->DeleteLocalRef(jnames);