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:
parent
1ca054ba53
commit
ed74422a62
Binary file not shown.
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user