* make sure we don't crash just because the clutter file filter isn't available (e.g if website is down)

This commit is contained in:
Reinhard Pointner 2015-07-25 22:46:06 +00:00
parent a30717fa34
commit abeb60dfb1
1 changed files with 7 additions and 2 deletions

View File

@ -83,9 +83,14 @@ public class MediaDetection {
return diskFolder; return diskFolder;
} }
public static FileFilter getClutterFileFilter() throws IOException { public static FileFilter getClutterFileFilter() {
if (clutterFile == null) { if (clutterFile == null) {
try {
clutterFile = releaseInfo.getClutterFileFilter(); clutterFile = releaseInfo.getClutterFileFilter();
} catch (IOException e) {
Logger.getLogger(MediaDetection.class.getClass().getName()).log(Level.WARNING, "Unable to access clutter file filter: " + e.getMessage(), e);
return ((File f) -> false);
}
} }
return clutterFile; return clutterFile;
} }