Skip to content

Commit

Permalink
commit to fix the tests
Browse files Browse the repository at this point in the history
Signed-off-by: Binbin <[email protected]>
  • Loading branch information
enjoy-binbin committed Aug 12, 2024
1 parent e6c0621 commit 854a0f8
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/config.c
Original file line number Diff line number Diff line change
Expand Up @@ -2709,7 +2709,11 @@ static int setConfigDirOption(standardConfig *config, sds *argv, int argc, const
*err = "dir can't be empty";
return 0;
}
if (hasActiveChildProcess()) {
if (hasActiveChildProcess() && server.child_type == CHILD_TYPE_AOF) {
*err = "it is unsafe to modify dir when a AOF rewrite is running";
return 0;
}
if (hasActiveChildProcess() && server.logfile[0] != '\0') {
*err = "it is unsafe to modify dir when a child process is running";
return 0;
}
Expand Down

0 comments on commit 854a0f8

Please sign in to comment.