mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-01 03:40:11 +01:00
core: suppress logging warning when trying to create existing directory
Suppress logging the following line: <warn> Error creating directory "/var/run/NetworkManager": 17 (File exists) Signed-off-by: Thomas Haller <thaller@redhat.com>
This commit is contained in:
parent
b7d6c61fe7
commit
c0e09de2b7
1 changed files with 4 additions and 2 deletions
|
|
@ -477,8 +477,10 @@ nm_dbus_manager_init (NMDBusManager *self)
|
|||
|
||||
#if HAVE_DBUS_GLIB_100
|
||||
/* Set up our main private DBus socket */
|
||||
if (mkdir (NMRUNDIR, 0700) == -1)
|
||||
nm_log_warn (LOGD_CORE, "Error creating directory \"%s\": %d (%s)", NMRUNDIR, errno, g_strerror (errno));
|
||||
if (mkdir (NMRUNDIR, 0700) == -1) {
|
||||
if (errno != EEXIST)
|
||||
nm_log_warn (LOGD_CORE, "Error creating directory \"%s\": %d (%s)", NMRUNDIR, errno, g_strerror (errno));
|
||||
}
|
||||
priv->priv_server = private_server_new (PRIV_SOCK_PATH, PRIV_SOCK_TAG, self);
|
||||
if (priv->priv_server) {
|
||||
priv->private_servers = g_slist_append (priv->private_servers, priv->priv_server);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue