mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-02-05 17:00:29 +01:00
libnm/vpn: gracefully handle empty dirname in _nm_vpn_plugin_info_list_load_dir()
No need to assert against an empty dirname. It's not different from any other non-existing directory and we should be graceful about that.
This commit is contained in:
parent
cf0c300058
commit
8e59be20d6
1 changed files with 4 additions and 1 deletions
|
|
@ -253,7 +253,10 @@ _nm_vpn_plugin_info_list_load_dir (const char *dirname,
|
|||
GSList *res = NULL;
|
||||
guint i;
|
||||
|
||||
g_return_val_if_fail (dirname && dirname[0], NULL);
|
||||
g_return_val_if_fail (dirname, NULL);
|
||||
|
||||
if (!dirname[0])
|
||||
return NULL;
|
||||
|
||||
dir = g_dir_open (dirname, 0, NULL);
|
||||
if (!dir)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue