mirror of
https://github.com/yacy/yacy_search_server.git
synced 2024-09-19 00:01:41 +02:00
fix: exception if default work files don't exist
This commit is contained in:
parent
9e4033f229
commit
0148f1bb8c
|
@ -339,12 +339,14 @@ public final class Switchboard extends serverSwitch {
|
|||
this.workPath.mkdirs();
|
||||
// if default work files exist, copy them (don't overwrite existing!)
|
||||
File defaultWorkPath = new File("defaults/data/work");
|
||||
for (String fs: defaultWorkPath.list()) {
|
||||
if (defaultWorkPath.list() != null) {
|
||||
for (String fs : defaultWorkPath.list()) {
|
||||
File wf = new File(this.workPath, fs);
|
||||
if (!wf.exists()) {
|
||||
Files.copy(new File(defaultWorkPath, fs), wf);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
this.log.logConfig("Work Path: " + this.workPath.toString());
|
||||
this.dictionariesPath =
|
||||
|
|
Loading…
Reference in New Issue
Block a user