mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager
synced 2024-10-15 12:34:55 +00:00
dispatcher: silence warning about sub-directories in dispatcher directory
Especially now that we have the 'pre-up.d/' and 'pre-down.d/' directories, silently skip over any sub directories inside the dispatcher directory. Fixes warning: nm-dispatcher: Cannot execute '/etc/NetworkManager/dispatcher.d/pre-up.d': not a regular file. Signed-off-by: Thomas Haller <thaller@redhat.com>
This commit is contained in:
parent
589272facf
commit
02747203c6
|
@ -454,6 +454,8 @@ find_scripts (const char *str_action)
|
|||
err = stat (path, &st);
|
||||
if (err)
|
||||
g_warning ("Failed to stat '%s': %d", path, err);
|
||||
else if (S_ISDIR (st.st_mode))
|
||||
; /* silently skip. */
|
||||
else if (!check_permissions (&st, &err_msg))
|
||||
g_warning ("Cannot execute '%s': %s", path, err_msg);
|
||||
else {
|
||||
|
|
Loading…
Reference in a new issue