diff options
Diffstat (limited to 'libappstream-glib/as-monitor.c')
-rw-r--r-- | libappstream-glib/as-monitor.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/libappstream-glib/as-monitor.c b/libappstream-glib/as-monitor.c index bec94f7..58cd356 100644 --- a/libappstream-glib/as-monitor.c +++ b/libappstream-glib/as-monitor.c @@ -412,14 +412,14 @@ as_monitor_add_directory (AsMonitor *monitor, g_autoptr(GDir) dir = NULL; /* find the files already in the directory */ - dir = g_dir_open (filename, 0, error); - if (dir == NULL) - return FALSE; - while ((tmp = g_dir_read_name (dir)) != NULL) { - g_autofree gchar *fn = NULL; - fn = g_build_filename (filename, tmp, NULL); - g_debug ("adding existing file: %s", fn); - _g_ptr_array_str_add (priv->files, fn); + dir = g_dir_open (filename, 0, NULL); + if (dir != NULL) { + while ((tmp = g_dir_read_name (dir)) != NULL) { + g_autofree gchar *fn = NULL; + fn = g_build_filename (filename, tmp, NULL); + g_debug ("adding existing file: %s", fn); + _g_ptr_array_str_add (priv->files, fn); + } } /* create new file monitor */ |