Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance
Java decentralizedintranet-searchintranet-search-enginep2pp2p-networkprivacyprivacy-protectionsearch-enginesearchenginewebweb-search-enginewebsearchwebseearch-engine
Copy the shipped Locales on Startup to DATA/LOCALES
allo8796987defc4
diff --git a/source/yacy.java b/source/yacy.javaindex 1b65b051d..c4991d222 100644--- a/source/yacy.java+++ b/source/yacy.java@@ -259,6 +259,21 @@ public final class yacy {String browserPopUpApplication = sb.getConfig("browserPopUpApplication", "netscape");serverSystem.openBrowser("http://localhost:" + port + "/" + browserPopUpPage, browserPopUpApplication);}++ //Copy the shipped locales into DATA+ File localesPath = new File(sb.getRootPath(), sb.getConfig("localesPath", "DATA/LOCALES"));+ File defaultLocalesPath = new File(sb.getRootPath(), "locales");++ try{+ File[] defaultLocales = defaultLocalesPath.listFiles();+ localesPath.mkdirs();+ for(int i=0;i < defaultLocales.length; i++){+ if(defaultLocales[i].getName().endsWith(".lng"))+ serverFileUtils.copy(defaultLocales[i], new File(localesPath, defaultLocales[i].getName()));+ }+ }catch(NullPointerException e){+ serverLog.logError("STARTUP", "Nullpointer Exception while copying the default Locales");+ }// registering shutdown hookserverLog.logSystem("STARTUP", "Registering Shutdown Hook");