Skip to content

Commit

Permalink
default skins support
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@1825 6c8d7289-2bf4-0310-a012-ef5d649a1542
  • Loading branch information
allo committed Mar 5, 2006
1 parent b9d5228 commit a8fa999
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion source/yacy.java
Expand Up @@ -94,6 +94,7 @@
import de.anomic.yacy.yacyClient;
import de.anomic.yacy.yacyCore;
import de.anomic.yacy.yacySeedDB;
import de.anomic.data.listManager;

/**
* This is the main class of YaCy. Several threads are started from here:
Expand All @@ -106,7 +107,7 @@
* loaded.
* <li>one serverCore - thread is started, which implements a multi-threaded
* server. The process may start itself many more processes that handle
* connections.
* connections.lo
* <li>finally, all idle-dependent processes are written in a queue in
* plasmaSwitchboard which are worked off inside an idle-sensitive loop of the
* main process. (here)
Expand Down Expand Up @@ -388,7 +389,9 @@ private static void startup(String homePath, long startupMemFree, long startupMe

//Copy the shipped locales into DATA
final File localesPath = new File(homePath, sb.getConfig("localesPath", "DATA/LOCALE"));
final File skinsPath = new File(homePath, sb.getConfig("skinsPath", "DATA/SKINS"));
final File defaultLocalesPath = new File(homePath, "locales");
final File defaultSkinsPath = new File(homePath, "skins");

try{
final File[] defaultLocales = defaultLocalesPath.listFiles();
Expand All @@ -401,6 +404,13 @@ private static void startup(String homePath, long startupMemFree, long startupMe
}catch(NullPointerException e){
serverLog.logSevere("STARTUP", "Nullpointer Exception while copying the default Locales");
}
final String[] skinFiles = listManager.getDirListing(defaultSkinsPath.getAbsolutePath());
skinsPath.mkdirs();
for(int i=0;i<skinFiles.length;i++){
if(skinFiles[i].endsWith(".css")){
serverFileUtils.copy(new File(defaultSkinsPath, skinFiles[i]), new File(skinsPath, skinFiles[i]));
}
}

//regenerate Locales from Translationlist, if needed
final String lang = sb.getConfig("htLocaleSelection", "");
Expand Down

0 comments on commit a8fa999

Please sign in to comment.