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:
@ -288,6 +288,8 @@ RocksDBStorage* RocksDBStorage::Create(const char* zName,
|
|||||||
{
|
{
|
||||||
unique_ptr<RocksDBStorage> sStorage;
|
unique_ptr<RocksDBStorage> sStorage;
|
||||||
|
|
||||||
|
bool ok = true;
|
||||||
|
|
||||||
if (mkdir(storageDirectory.c_str(), S_IRWXU) == 0)
|
if (mkdir(storageDirectory.c_str(), S_IRWXU) == 0)
|
||||||
{
|
{
|
||||||
MXS_NOTICE("Created storage directory %s.", storageDirectory.c_str());
|
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",
|
MXS_ERROR("Failed to create storage directory %s: %s",
|
||||||
storageDirectory.c_str(),
|
storageDirectory.c_str(),
|
||||||
strerror_r(errno, errbuf, sizeof(errbuf)));
|
strerror_r(errno, errbuf, sizeof(errbuf)));
|
||||||
|
ok = false;
|
||||||
}
|
}
|
||||||
else
|
|
||||||
|
if (ok)
|
||||||
{
|
{
|
||||||
string path(storageDirectory + "/" + zName);
|
string path(storageDirectory + "/" + zName);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user