From e52370728a0f82df7188d21bed6a55d836ccd7f3 Mon Sep 17 00:00:00 2001 From: reger Date: Sat, 6 Dec 2014 02:25:24 +0100 Subject: [PATCH] fix startup stop on missing HTCACHE/SNAPSHOT directory --- source/net/yacy/search/Switchboard.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/source/net/yacy/search/Switchboard.java b/source/net/yacy/search/Switchboard.java index b1f57d594..fdbe91dc0 100644 --- a/source/net/yacy/search/Switchboard.java +++ b/source/net/yacy/search/Switchboard.java @@ -698,8 +698,10 @@ public final class Switchboard extends serverSwitch { final long maxCacheSize = 1024L * 1024L * Long.parseLong(getConfig(SwitchboardConstants.PROXY_CACHE_SIZE, "2")); // this is megabyte Cache.init(this.htCachePath, this.peers.mySeed().hash, maxCacheSize); - this.snapshots = new Snapshots(new File(this.htCachePath, "SNAPSHOTS")); - + final File snapshotdir = new File(this.htCachePath, "SNAPSHOTS"); + snapshotdir.mkdirs(); // create directory if missing + this.snapshots = new Snapshots(snapshotdir); + // create the surrogates directories this.surrogatesInPath = getDataPath(