mirror of
https://github.com/redis/redis.git
synced 2026-04-21 03:01:35 -04:00
Fix adding bulk reply when getcwd fails
This commit is contained in:
committed by
antirez
parent
9c3a89853c
commit
a830d941a7
@@ -526,12 +526,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)) {
|
||||
|
||||
Reference in New Issue
Block a user