shada: Refuse to write ShaDa file when ShaDa was disabled

This commit is contained in:
ZyX
2015-08-16 01:16:24 +03:00
parent e2c3ea4445
commit be45e75026
2 changed files with 24 additions and 1 deletions

View File

@@ -2895,6 +2895,10 @@ shada_write_exit:
/// @return OK if writing was successfull, FAIL otherwise.
int shada_write_file(const char *const file, bool nomerge)
{
if (shada_disabled()) {
return FAIL;
}
char *const fname = shada_filename(file);
char *tempname = NULL;
ShaDaWriteDef sd_writer = (ShaDaWriteDef) {