Skip to content
Snippets Groups Projects
Commit 6c78722c authored by Tobias Pietzsch's avatar Tobias Pietzsch
Browse files

workaround OS X FilenameFilter workaround failing on win7

parent cdcfab73
No related branches found
No related tags found
No related merge requests found
......@@ -7,6 +7,7 @@ import java.awt.FileDialog;
import java.awt.Frame;
import java.io.File;
import java.io.FilenameFilter;
import java.util.Locale;
import java.util.concurrent.atomic.AtomicBoolean;
import javax.swing.JFileChooser;
......@@ -87,7 +88,7 @@ public class BigDataViewerPlugIn implements PlugIn
}
} );
fd.setVisible( true );
if ( !workedWithFilenameFilter.get() )
if ( isMac() && !workedWithFilenameFilter.get() )
{
fd.setFilenameFilter( null );
fd.setVisible( true );
......@@ -112,4 +113,10 @@ public class BigDataViewerPlugIn implements PlugIn
}
}
}
private boolean isMac()
{
final String OS = System.getProperty( "os.name", "generic" ).toLowerCase( Locale.ENGLISH );
return ( OS.indexOf( "mac" ) >= 0 ) || ( OS.indexOf( "darwin" ) >= 0 );
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment