]> git.saurik.com Git - redis.git/blobdiff - src/db.c
PERSIST: a fix and some basic test
[redis.git] / src / db.c
index 81e41430dcd3a399741cc5da6445ad8c933c54e3..0dec95b1c5763a8ecea00b2a469cebf14ce5ffb4 100644 (file)
--- a/src/db.c
+++ b/src/db.c
@@ -532,9 +532,11 @@ void persistCommand(redisClient *c) {
     if (de == NULL) {
         addReply(c,shared.czero);
     } else {
-        if (removeExpire(c->db,c->argv[1]))
+        if (removeExpire(c->db,c->argv[1])) {
             addReply(c,shared.cone);
-        else
+            server.dirty++;
+        } else {
             addReply(c,shared.czero);
+        }
     }
 }