mirror of
https://github.com/fluencelabs/redis
synced 2025-04-11 11:46:04 +00:00
Fix adding bulk reply when getcwd fails
This commit is contained in:
parent
4d6bf65c42
commit
bb831c313c
@ -508,12 +508,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)) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user