Commit d16bb64f authored by antirez's avatar antirez
Browse files

Check that the file exists in removeRDBUsedToSyncReplicas().

parent ff024e30
...@@ -944,10 +944,14 @@ void removeRDBUsedToSyncReplicas(void) { ...@@ -944,10 +944,14 @@ void removeRDBUsedToSyncReplicas(void) {
} }
} }
if (delrdb) { if (delrdb) {
serverLog(LL_NOTICE,"Removing the RDB file used to feed replicas " struct stat sb;
"in a persistence-less instance"); if (lstat(server.rdb_filename,&sb) != -1) {
RDBGeneratedByReplication = 0; RDBGeneratedByReplication = 0;
bg_unlink(server.rdb_filename); serverLog(LL_NOTICE,
"Removing the RDB file used to feed replicas "
"in a persistence-less instance");
bg_unlink(server.rdb_filename);
}
} }
} }
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment