mirror of https://github.com/halo-dev/halo
Remove random theme folder generation (#1305)
parent
caab2f3b93
commit
7ba2377ae8
|
@ -1,6 +1,5 @@
|
||||||
package run.halo.app.repository;
|
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.properties.PrimaryProperties.THEME;
|
||||||
import static run.halo.app.model.support.HaloConst.DEFAULT_THEME_ID;
|
import static run.halo.app.model.support.HaloConst.DEFAULT_THEME_ID;
|
||||||
import static run.halo.app.utils.FileUtils.copyFolder;
|
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}
|
// 3. move the temp folder into templates/themes/{theme_id}
|
||||||
final var sourceThemePath = Paths.get(newProperty.getThemePath());
|
final var sourceThemePath = Paths.get(newProperty.getThemePath());
|
||||||
final var targetThemePath =
|
final var targetThemePath =
|
||||||
getThemeRootPath().resolve(newProperty.getId() + "-" + randomAlphabetic(5));
|
getThemeRootPath().resolve(newProperty.getId());
|
||||||
|
|
||||||
// 4. clear target theme folder firstly
|
// 4. clear target theme folder firstly
|
||||||
deleteFolderQuietly(targetThemePath);
|
deleteFolderQuietly(targetThemePath);
|
||||||
|
|
Loading…
Reference in New Issue