1
mirror of https://github.com/rapid7/metasploit-framework synced 2024-11-12 11:52:01 +01:00

Fix for Linux error on get system icon call. Fixes bug #2283

git-svn-id: file:///home/svn/framework3/trunk@9894 4d416f70-5f16-0410-b530-b9f4589650da
This commit is contained in:
Matt Weeks 2010-07-20 23:57:02 +00:00
parent 1ca054ba53
commit ed74422a62
2 changed files with 4 additions and 1 deletions

Binary file not shown.

View File

@ -63,13 +63,16 @@ public class MeterpFileBrowser extends MsfFrame {
final FileSystemView view = FileSystemView.getFileSystemView();
folderIcon = view.getSystemIcon(view.getDefaultDirectory());
File tempFile = null;
Icon tempIcon;
try{
tempFile = File.createTempFile("temp", ".txt");
tempIcon = view.getSystemIcon(tempFile);
tempFile.delete();
} catch (IOException iox){
tempIcon = null;
JOptionPane.showMessageDialog(null, "Cannot create temp file. Weird.");
}
fileIcon = view.getSystemIcon(tempFile);
fileIcon = tempIcon;
tempFile.delete();
mainTable.setDefaultRenderer(Object.class,new DefaultTableCellRenderer(){
@Override