Add check for missing icon file.
This commit is contained in:
parent
62fa2b9399
commit
27d864c752
1 changed files with 12 additions and 0 deletions
|
@ -27,6 +27,7 @@ import org.slf4j.Logger;
|
|||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import fr.devinsy.statoolinfos.HtmlizerContext;
|
||||
import fr.devinsy.statoolinfos.core.Category;
|
||||
import fr.devinsy.statoolinfos.core.Configuration;
|
||||
import fr.devinsy.statoolinfos.core.StatoolInfosException;
|
||||
import fr.devinsy.statoolinfos.core.StatoolInfosUtils;
|
||||
|
@ -102,6 +103,17 @@ public class Htmlizer
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Check.
|
||||
for (Category category : HtmlizerContext.instance().getCategories())
|
||||
{
|
||||
File categoryFile = new File(targetDirectory, category.getLogoPath());
|
||||
|
||||
if (!categoryFile.exists())
|
||||
{
|
||||
category.setLogoPath(null);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue