提交 80487948 编写于 作者: M malenkov

8021379: JFileChooser Create New Folder button enabled in write proteced directory

Reviewed-by: alexsch
上级 46b73c47
......@@ -1980,18 +1980,18 @@ public class FilePane extends JPanel implements PropertyChangeListener {
}
if (f instanceof ShellFolder) {
return ((ShellFolder) f).isFileSystem();
return f.canWrite();
} else {
if (usesShellFolder(getFileChooser())) {
try {
return ShellFolder.getShellFolder(f).isFileSystem();
return ShellFolder.getShellFolder(f).canWrite();
} catch (FileNotFoundException ex) {
// File doesn't exist
return false;
}
} else {
// Ordinary file
return true;
return f.canWrite();
}
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册