From 7ba2377ae89e2235b3ccfbb5eaf2ea961896b3d7 Mon Sep 17 00:00:00 2001 From: John Niang Date: Sun, 7 Mar 2021 22:39:38 +0800 Subject: [PATCH] Remove random theme folder generation (#1305) --- src/main/java/run/halo/app/repository/ThemeRepositoryImpl.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/main/java/run/halo/app/repository/ThemeRepositoryImpl.java b/src/main/java/run/halo/app/repository/ThemeRepositoryImpl.java index ef3ca6d55..689396958 100644 --- a/src/main/java/run/halo/app/repository/ThemeRepositoryImpl.java +++ b/src/main/java/run/halo/app/repository/ThemeRepositoryImpl.java @@ -1,6 +1,5 @@ package run.halo.app.repository; -import static org.apache.commons.lang3.RandomStringUtils.randomAlphabetic; import static run.halo.app.model.properties.PrimaryProperties.THEME; import static run.halo.app.model.support.HaloConst.DEFAULT_THEME_ID; import static run.halo.app.utils.FileUtils.copyFolder; @@ -147,7 +146,7 @@ public class ThemeRepositoryImpl // 3. move the temp folder into templates/themes/{theme_id} final var sourceThemePath = Paths.get(newProperty.getThemePath()); final var targetThemePath = - getThemeRootPath().resolve(newProperty.getId() + "-" + randomAlphabetic(5)); + getThemeRootPath().resolve(newProperty.getId()); // 4. clear target theme folder firstly deleteFolderQuietly(targetThemePath);