Commit 6db070a1 authored by Liang Ding's avatar Liang Ding

🔊 #12495

parent 840196c9
......@@ -51,7 +51,7 @@ import static org.b3log.solo.util.Skins.setDirectoryForTemplateLoading;
* Preference management service.
*
* @author <a href="http://88250.b3log.org">Liang Ding</a>
* @version 1.3.2.13, Jul 22, 2017
* @version 1.3.2.14, Sep 1, 2018
* @since 0.4.0
*/
@Service
......@@ -108,9 +108,8 @@ public class PreferenceMgmtService {
for (final String dirName : skinDirNames) {
final JSONObject skin = new JSONObject();
final String name = Latkes.getSkinName(dirName);
if (null == name) {
LOGGER.log(Level.WARN, "The directory[{0}] does not contain any skin, ignored it", dirName);
LOGGER.log(Level.WARN, "The directory [{0}] does not contain any skin, ignored it", dirName);
continue;
}
......@@ -127,14 +126,12 @@ public class PreferenceMgmtService {
LOGGER.log(Level.DEBUG, "Current skin[name={0}]", skinName);
if (!skinDirNames.contains(currentSkinDirName)) {
LOGGER.log(Level.WARN, "Configred skin[dirName={0}] can not find, try to use " + "default skin[dirName="
LOGGER.log(Level.WARN, "Configured skin [dirName={0}] can not find, try to use " + "default skin [dirName="
+ Option.DefaultPreference.DEFAULT_SKIN_DIR_NAME + "] instead.", currentSkinDirName);
if (!skinDirNames.contains(Option.DefaultPreference.DEFAULT_SKIN_DIR_NAME)) {
LOGGER.log(Level.ERROR, "Can not find skin[dirName=" + Option.DefaultPreference.DEFAULT_SKIN_DIR_NAME + "]");
throw new IllegalStateException(
"Can not find default skin[dirName=" + Option.DefaultPreference.DEFAULT_SKIN_DIR_NAME
+ "], please redeploy your Solo and make sure contains this default skin!");
LOGGER.log(Level.ERROR, "Can not find default skin [dirName=" + Option.DefaultPreference.DEFAULT_SKIN_DIR_NAME
+ "], please redeploy your Solo and make sure contains the default skin. If you are using git, try to re-pull with 'git pull --recurse-submodules'");
System.exit(-1);
}
preference.put(SKIN_DIR_NAME, Option.DefaultPreference.DEFAULT_SKIN_DIR_NAME);
......
......@@ -46,7 +46,7 @@ import java.util.*;
* Skin utilities.
*
* @author <a href="http://88250.b3log.org">Liang Ding</a>
* @version 1.1.5.9, Jul 31, 2018
* @version 1.1.5.10, Sep 1, 2018
* @since 0.3.1
*/
public final class Skins {
......@@ -164,8 +164,7 @@ public final class Skins {
for (final String path : resourcePaths) {
final String dirName = path.substring("/skins".length() + 1, path.length() - 1);
if (dirName.startsWith(".")) {
if (dirName.contains(".")) {
continue;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment