Fixed return value of srv_open().

This commit is contained in:
default 2022-11-25 10:56:34 +01:00
parent 45be9a1cb1
commit 1acfe8fc54

6
data.c
View File

@ -72,10 +72,10 @@ int srv_open(char *basedir, int auto_upgrade)
if (auto_upgrade) if (auto_upgrade)
ret = db_upgrade(&error); ret = db_upgrade(&error);
else { else {
if (xs_number_get(xs_dict_get(srv_config, "layout")) < db_layout) { if (xs_number_get(xs_dict_get(srv_config, "layout")) < db_layout)
ret = 0;
error = xs_fmt("ERROR: db layout changed - execute 'snac upgrade' first"); error = xs_fmt("ERROR: db layout changed - execute 'snac upgrade' first");
} else
ret = 1;
} }
} }