]> git.saurik.com Git - redis.git/blobdiff - src/config.c
redis-trib: minor refactoring creating a method to load the cluster information start...
[redis.git] / src / config.c
index 6f9657dde8ffde20b0b794f96dc81a1fdc5a171b..d470dab1a1d80614be08ab53557a26c1c7b91eb8 100644 (file)
@@ -508,12 +508,11 @@ void configGetCommand(redisClient *c) {
     if (stringmatch(pattern,"dir",0)) {
         char buf[1024];
 
-        addReplyBulkCString(c,"dir");
-        if (getcwd(buf,sizeof(buf)) == NULL) {
+        if (getcwd(buf,sizeof(buf)) == NULL)
             buf[0] = '\0';
-        } else {
-            addReplyBulkCString(c,buf);
-        }
+
+        addReplyBulkCString(c,"dir");
+        addReplyBulkCString(c,buf);
         matches++;
     }
     if (stringmatch(pattern,"dbfilename",0)) {