[cheese/wip/hadess/fix-infinite-loop: 2/2] Show better error when file info query fails
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [cheese/wip/hadess/fix-infinite-loop: 2/2] Show better error when file info query fails
- Date: Fri, 18 Sep 2020 10:09:32 +0000 (UTC)
commit 76e55a4cdc684dab01a45fd22742e3ab547f120b
Author: Bastien Nocera <hadess hadess net>
Date: Fri Sep 18 12:09:00 2020 +0200
Show better error when file info query fails
src/thumbview/cheese-thumb-view.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/src/thumbview/cheese-thumb-view.c b/src/thumbview/cheese-thumb-view.c
index 232fd4b6..f01b33df 100644
--- a/src/thumbview/cheese-thumb-view.c
+++ b/src/thumbview/cheese-thumb-view.c
@@ -113,12 +113,14 @@ cheese_thumb_view_idle_append_item (gpointer data)
char *mime_type;
char *uri;
char *filename;
+ GError *error = NULL;
- info = g_file_query_info (file, "standard::content-type,time::modified", 0, NULL, NULL);
+ info = g_file_query_info (file, "standard::content-type,time::modified", 0, NULL, &error);
if (!info)
{
- g_warning ("Invalid filename\n");
+ g_warning ("Could not query file info: %s", error->message);
+ g_error_free (error);
g_slice_free (CheeseThumbViewIdleData, item);
return TRUE;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]