mirror of https://gitee.com/bigwinds/arangodb
do not fail when encountering an empty database directory
This commit is contained in:
parent
bb3c8a427b
commit
82d513a546
|
@ -440,12 +440,21 @@ static int OpenDatabases(TRI_server_t* server, bool isUpgrade) {
|
||||||
|
|
||||||
if (!TRI_ExistsFile(parametersFile.c_str())) {
|
if (!TRI_ExistsFile(parametersFile.c_str())) {
|
||||||
// no parameter.json file
|
// no parameter.json file
|
||||||
LOG(ERR) << "database directory '" << databaseDirectory
|
|
||||||
<< "' does not contain parameters file or parameters file "
|
if (TRI_FilesDirectory(databaseDirectory.c_str()).empty()) {
|
||||||
"cannot be read";
|
// directory is otherwise empty, continue!
|
||||||
|
LOG(WARN) << "ignoring empty database directory '" << databaseDirectory
|
||||||
|
<< "' without parameters file";
|
||||||
|
|
||||||
// abort
|
res = TRI_ERROR_NO_ERROR;
|
||||||
res = TRI_ERROR_ARANGO_ILLEGAL_PARAMETER_FILE;
|
} else {
|
||||||
|
// abort
|
||||||
|
LOG(ERR) << "database directory '" << databaseDirectory
|
||||||
|
<< "' does not contain parameters file or parameters file "
|
||||||
|
"cannot be read";
|
||||||
|
|
||||||
|
res = TRI_ERROR_ARANGO_ILLEGAL_PARAMETER_FILE;
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue