Skip to content
Snippets Groups Projects
Commit dc4d9eb9 authored by Rob Swindell's avatar Rob Swindell :speech_balloon:
Browse files

Don't log an error if there's no dsts.ini or dsts.dab file

In a fresh install, neither of these files would exist, and that's normal,
so getstats() should just return true in that case (with the stats struct
zeroed-out).

Fixes error during login to a new install reported by Zoltán Gábor on
Facebook.
parent 5caffa65
No related branches found
No related tags found
1 merge request!463MRC mods by Codefenix (2024-10-20)
Pipeline #4817 passed
......@@ -163,8 +163,10 @@ BOOL getstats(scfg_t* cfg, uint node, stats_t* stats)
} legacy_stats;
SAFEPRINTF(path,"%sdsts.dab",node ? cfg->node_path[node-1] : cfg->ctrl_dir);
if(!fexistcase(path))
return TRUE;
if((file=nopen(path,O_RDONLY))==-1) {
return(FALSE);
return(FALSE);
}
int rd = read(file, &legacy_stats, sizeof(legacy_stats));
close(file);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment