Ok to continue even if storage directory is created at startup
Due to some refactoring that possibility had been lost.
This commit is contained in:
parent
9430da94b9
commit
6a90b0c629
@ -288,6 +288,8 @@ RocksDBStorage* RocksDBStorage::Create(const char* zName,
|
||||
{
|
||||
unique_ptr<RocksDBStorage> sStorage;
|
||||
|
||||
bool ok = true;
|
||||
|
||||
if (mkdir(storageDirectory.c_str(), S_IRWXU) == 0)
|
||||
{
|
||||
MXS_NOTICE("Created storage directory %s.", storageDirectory.c_str());
|
||||
@ -298,8 +300,10 @@ RocksDBStorage* RocksDBStorage::Create(const char* zName,
|
||||
MXS_ERROR("Failed to create storage directory %s: %s",
|
||||
storageDirectory.c_str(),
|
||||
strerror_r(errno, errbuf, sizeof(errbuf)));
|
||||
ok = false;
|
||||
}
|
||||
else
|
||||
|
||||
if (ok)
|
||||
{
|
||||
string path(storageDirectory + "/" + zName);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user