i2psnark: Add checks for dup data dirs (ticket #2291)

Add two HashMaps for faster dup checks
This commit is contained in:
zzz
2019-08-04 18:54:01 +00:00
parent 0ce4811dec
commit 49af26d958
3 changed files with 131 additions and 47 deletions

View File

@@ -1229,6 +1229,8 @@ public class Snark
baseFile = new File(rootDataDir, base);
else
baseFile = new SecureFile(rootDataDir, base);
if (baseFile.exists())
throw new IOException("Data location already exists: " + baseFile);
// The following two may throw IOE...
storage = new Storage(_util, baseFile, metainfo, this, false);
storage.check();