projects
/
platform
/
upstream
/
glib.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
dfaaf37
)
gresource: Use GError in more places
author
Matthias Clasen
<mclasen@redhat.com>
Thu, 18 Sep 2014 18:51:09 +0000
(14:51 -0400)
committer
Matthias Clasen
<mclasen@redhat.com>
Thu, 18 Sep 2014 18:52:03 +0000
(14:52 -0400)
The API gives us an error message, lets use it.
gio/gresource-tool.c
patch
|
blob
|
history
diff --git
a/gio/gresource-tool.c
b/gio/gresource-tool.c
index
634a83a
..
bbe43c3
100644
(file)
--- a/
gio/gresource-tool.c
+++ b/
gio/gresource-tool.c
@@
-113,8
+113,9
@@
extract_resource (GResource *resource,
const gchar *path)
{
GBytes *bytes;
+ GError *error = NULL;
- bytes = g_resource_lookup_data (resource, path, 0,
NULL
);
+ bytes = g_resource_lookup_data (resource, path, 0,
&error
);
if (bytes != NULL)
{
gconstpointer data;
@@
-128,7
+129,8
@@
extract_resource (GResource *resource,
}
else
{
- g_printerr ("Can't find resource path %s\n", path);
+ g_printerr ("%s\n", error->message);
+ g_error_free (error);
}
}