我有以下方法作为JavaFX ui的一部分:
@FXML
private void chooseDir(){
Stage stageFileChooser = new Stage();
DirectoryChooser chooser = new DirectoryChooser();
chooser.setTitle("Select the output destination");
File outDest = chooser.showDialog(stageFileChooser);
}
大部分时间都可以正常工作。除非我选择这样的顶级库文件夹(Windows 7):
在这种情况下,我收到以下错误:
Error:80070057 in pFile-> GetDisplayName(SIGDN_FILESYSPATH, &path)
COM Error:80070057 The parameter is incorrect.