mirror of https://github.com/halo-dev/halo
Refactor StartedListener
parent
1d95969198
commit
39407aa8cf
|
@ -143,9 +143,9 @@ public class StartedListener implements ApplicationListener<ApplicationStartedEv
|
||||||
*/
|
*/
|
||||||
private void initThemes() {
|
private void initThemes() {
|
||||||
// Whether the blog is initialized
|
// Whether the blog is initialized
|
||||||
String isInstall = optionService.getByKeyOfNullable(BlogProperties.IS_INSTALL.getValue());
|
Boolean isInstall = optionService.getByProperty(BlogProperties.IS_INSTALL, Boolean.class, false);
|
||||||
try {
|
try {
|
||||||
if (null == isInstall) {
|
if (!isInstall) {
|
||||||
File internalThemePath = new File(ResourceUtils.getURL("classpath:").getPath(), "templates/themes");
|
File internalThemePath = new File(ResourceUtils.getURL("classpath:").getPath(), "templates/themes");
|
||||||
File[] internalThemes = internalThemePath.listFiles();
|
File[] internalThemes = internalThemePath.listFiles();
|
||||||
if (null != internalThemes) {
|
if (null != internalThemes) {
|
||||||
|
|
Loading…
Reference in New Issue