提交 62e6f6c2 编写于 作者: P Pieter Noordhuis 提交者: antirez

Fix adding bulk reply when getcwd fails

上级 33d2761b
...@@ -483,12 +483,11 @@ void configGetCommand(redisClient *c) { ...@@ -483,12 +483,11 @@ void configGetCommand(redisClient *c) {
if (stringmatch(pattern,"dir",0)) { if (stringmatch(pattern,"dir",0)) {
char buf[1024]; char buf[1024];
addReplyBulkCString(c,"dir"); if (getcwd(buf,sizeof(buf)) == NULL)
if (getcwd(buf,sizeof(buf)) == NULL) {
buf[0] = '\0'; buf[0] = '\0';
} else {
addReplyBulkCString(c,buf); addReplyBulkCString(c,"dir");
} addReplyBulkCString(c,buf);
matches++; matches++;
} }
if (stringmatch(pattern,"dbfilename",0)) { if (stringmatch(pattern,"dbfilename",0)) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册