未验证 提交 9801bc7a 编写于 作者: G guqing 提交者: GitHub

Fixed the problem that copying the default theme at halo startup did not use...

Fixed the problem that copying the default theme at halo startup did not use themeId as the theme folder name (#1549)

* fix: 1547

* refactor: replace the string magic value using a static constant
上级 603c4c6e
......@@ -165,10 +165,10 @@ public class StartedListener implements ApplicationListener<ApplicationStartedEv
}
// Create theme folder
Path themePath = themeService.getBasePath();
Path themePath = themeService.getBasePath().resolve(HaloConst.DEFAULT_THEME_ID);
if (themeService.fetchThemePropertyBy(HaloConst.DEFAULT_THEME_ID).isEmpty()) {
FileUtils.copyFolder(source, themePath);
FileUtils.copyFolder(source.resolve(HaloConst.DEFAULT_THEME_DIR_NAME), themePath);
log.info("Copied theme folder from [{}] to [{}]", source, themePath);
}
} catch (Exception e) {
......
......@@ -48,6 +48,11 @@ public class HaloConst {
*/
public static final String DEFAULT_THEME_ID = "caicai_anatole";
/**
* Default theme directory name.
*/
public static final String DEFAULT_THEME_DIR_NAME = "anatole";
/**
* Default error path.
*/
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册