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

In debug builds only, backup dsts.ini file when opening for write

Hopefully help to determine cause of issue #791 (when is the apparent
corruption of this file occurring?)
parent 57c2367a
Branches
Tags
No related merge requests found
......@@ -67,6 +67,10 @@ FILE* fopen_dstats(scfg_t* cfg, uint node, bool for_write)
char path[MAX_PATH+1];
dstats_fname(cfg, node, path, sizeof(path));
#ifdef _DEBUG
if(for_write)
backup(path, 99, /* rename: */false);
#endif
return fnopen(NULL, path, for_write ? O_CREAT|O_RDWR : O_RDONLY);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment