Skip to content
Snippets Groups Projects
Commit e2161ece authored by Daniel's avatar Daniel
Browse files

FIX: Calling Info on freshly started CaosDB works again.

Also now syncs the database info if that has not been done before.

Fixes #54.
parent 71f1c74b
No related branches found
No related tags found
No related merge requests found
......@@ -77,7 +77,7 @@ public class Info extends AbstractObservable implements Observer, TransactionInt
private static int recordsCount = -1;
private static int recordTypesCount = -1;
private static int tmpFilesCount;
private static String fssize;
private static String fssize = "";
public static Integer getRecordsCount() throws Exception {
return recordsCount;
......@@ -197,6 +197,9 @@ public class Info extends AbstractObservable implements Observer, TransactionInt
* TODO: The error format for missing or not readable drop off box has to be specified.
*/
public static Element toElement(final boolean tree) throws Exception, SQLException {
if (filesCount == -1 && recordsCount == -1) {
getInstance().syncDatabase();
}
dropOffBox = new File(FileSystem.getDropOffBox());
final Element info = new Element("Stats");
final Element counts = new Element("counts");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment