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)
ret = db_upgrade(&error);
else {
if (xs_number_get(xs_dict_get(srv_config, "layout")) < db_layout) {
ret = 0;
if (xs_number_get(xs_dict_get(srv_config, "layout")) < db_layout)
error = xs_fmt("ERROR: db layout changed - execute 'snac upgrade' first");
}
else
ret = 1;
}
}