Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
ruibaby authored Apr 8, 2021
1 parent 1392f09 commit de2b8da
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,6 @@
@ConfigurationProperties("halo")
public class HaloProperties {

/**
* Production env. (Default is true)
*/
@Deprecated
private boolean productionEnv = true;

/**
* Authentication enabled.
*/
Expand Down
6 changes: 1 addition & 5 deletions src/main/java/run/halo/app/listener/StartedListener.java
Original file line number Diff line number Diff line change
Expand Up @@ -146,10 +146,6 @@ private void initThemes() {
Boolean isInstalled = optionService
.getByPropertyOrDefault(PrimaryProperties.IS_INSTALLED, Boolean.class, false);

if (isInstalled) {
return;
}

try {
String themeClassPath = ResourceUtils.CLASSPATH_URL_PREFIX + ThemeService.THEME_FOLDER;

Expand All @@ -172,7 +168,7 @@ private void initThemes() {
Path themePath = themeService.getBasePath();

// Fix the problem that the project cannot start after moving to a new server
if (!haloProperties.getMode().isProductionEnv() || Files.notExists(themePath)) {
if (Files.notExists(themePath) || !isInstalled) {
FileUtils.copyFolder(source, themePath);
log.debug("Copied theme folder from [{}] to [{}]", source, themePath);
} else {
Expand Down

0 comments on commit de2b8da

Please sign in to comment.