fixed KVStore loading

This commit is contained in:
Djeeberjr 2023-03-28 00:55:23 +02:00
parent 4fbd064439
commit 7480afc5a1

View File

@ -17,12 +17,13 @@ class KVStore {
} }
private static function getNamespaceFile(namespace: String): String { private static function getNamespaceFile(namespace: String): String {
return '/$namespace'; return '/var/ns/$namespace';
} }
public function load() { public function load() {
if (FS.exists(getNamespaceFile(namespace))){ var nsFile = getNamespaceFile(this.namespace);
var handle = FS.openRead("/" + namespace); if (FS.exists(nsFile)){
var handle = FS.openRead(nsFile);
parseFile(handle.readAll()); parseFile(handle.readAll());
} }
} }