diff --git a/src/nodash/core/spheres/NoHashSphereDefault.java b/src/nodash/core/spheres/NoHashSphereDefault.java index fb7a55d..2470298 100644 --- a/src/nodash/core/spheres/NoHashSphereDefault.java +++ b/src/nodash/core/spheres/NoHashSphereDefault.java @@ -36,11 +36,20 @@ import nodash.models.NoUser; public final class NoHashSphereDefault implements NoHashSphereInterface { private Set database = Collections.newSetFromMap(new ConcurrentHashMap()); + private String fileName; + + public NoHashSphereDefault(String fileName) { + this.fileName = fileName; + } + + public NoHashSphereDefault() { + this.fileName = NoCore.config.databaseFilename; + } @SuppressWarnings("unchecked") public void setup() { if (NoCore.config.saveDatabase) { - File file = new File(NoCore.config.databaseFilename); + File file = new File(this.fileName); if (file.exists()) { try { byte[] data = Files.readAllBytes(file.toPath());