diff options
author | Kalev Lember <klember@redhat.com> | 2016-07-06 10:49:55 +0200 |
---|---|---|
committer | Kalev Lember <klember@redhat.com> | 2016-07-06 16:05:42 +0200 |
commit | 7f9167edbb1f4b8aebcd85fce7d424d7c14b7517 (patch) | |
tree | a372eb242af5cd2b1998da6f23b8612f597d57b1 | |
parent | c6cea6efa688d972f9f1b88b6837cacff51383dd (diff) | |
download | appstream-glib-7f9167edbb1f4b8aebcd85fce7d424d7c14b7517.tar.gz |
store: Don't emit a warning when flatpak user directory doesn't exist
-rw-r--r-- | libappstream-glib/as-store.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libappstream-glib/as-store.c b/libappstream-glib/as-store.c index 0e78c10..6a38f7d 100644 --- a/libappstream-glib/as-store.c +++ b/libappstream-glib/as-store.c @@ -1432,6 +1432,11 @@ as_store_add_path_data (AsStore *store, AsStorePrivate *priv = GET_PRIVATE (store); AsStorePathData *path_data; + /* don't scan non-existent directories */ + if (!g_file_test (path, G_FILE_TEST_EXISTS)) { + return; + } + /* check is a directory */ if (!g_file_test (path, G_FILE_TEST_IS_DIR)) { g_warning ("not adding path %s [%s:%s] as not a directory", |