diff --git a/src/utils_rrdcreate.c b/src/utils_rrdcreate.c
index 3b8f342a44def634ff04210ad579e8dce5617e4e..a34e0da0103936de01b652996cb956b5d327f93a 100644 (file)
--- a/src/utils_rrdcreate.c
+++ b/src/utils_rrdcreate.c
return (EEXIST);
}
- errno = 0;
status = stat (filename, &sb);
- if (errno != ENOENT)
+ if ((status == 0) || (errno != ENOENT))
{
pthread_mutex_unlock (&async_creation_lock);
return (EEXIST);