Skip to content

Commit

Permalink
Remove random theme folder generation (halo-dev#1305)
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnNiang authored Mar 7, 2021
1 parent 9112398 commit 13783a0
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
@@ -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;
Expand Down Expand Up @@ -147,7 +146,7 @@ public ThemeProperty attemptToAdd(ThemeProperty newProperty) {
// 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);
Expand Down

0 comments on commit 13783a0

Please sign in to comment.