Fixed error messages being printed for existing directories.

This commit is contained in:
Markus Makela 2015-07-13 19:35:38 +03:00
parent d799a2d676
commit a1801237a8

View File

@ -278,10 +278,13 @@ GWPROTOCOL *funcs;
if(mkdir_rval)
{
skygw_log_write(LOGFILE_ERROR,"Error : Failed to create directory '%s': [%d] %s",
path,
errno,
strerror(errno));
if(errno != EEXIST)
{
skygw_log_write(LOGFILE_ERROR,"Error : Failed to create directory '%s': [%d] %s",
path,
errno,
strerror(errno));
}
mkdir_rval = 0;
}
@ -293,10 +296,13 @@ GWPROTOCOL *funcs;
if(mkdir_rval)
{
skygw_log_write(LOGFILE_ERROR,"Error : Failed to create directory '%s': [%d] %s",
path,
errno,
strerror(errno));
if(errno != EEXIST)
{
skygw_log_write(LOGFILE_ERROR,"Error : Failed to create directory '%s': [%d] %s",
path,
errno,
strerror(errno));
}
mkdir_rval = 0;
}
strncat(path, "/dbusers", PATH_MAX);