summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Nocera <hadess@hadess.net>2015-12-16 14:13:10 +0100
committerBastien Nocera <hadess@hadess.net>2015-12-16 14:14:44 +0100
commite12b770ee53cb72083cfeaf95ec98f314288e9bc (patch)
tree8c9d30bc0de3bf8f68f9855897264c366a9b0bcc
parent4760581e6533ff0853de074ef04968a7ab60f0ca (diff)
net: Better error message when a mock file is absent
Now we'll print the path of the missing file, instead of a glib message about it.
-rw-r--r--libs/net/grl-net-mock.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/libs/net/grl-net-mock.c b/libs/net/grl-net-mock.c
index ce9c367..0aebceb 100644
--- a/libs/net/grl-net-mock.c
+++ b/libs/net/grl-net-mock.c
@@ -106,16 +106,15 @@ get_url_mocked (GrlNetWc *self,
if (data_file[0] != '/') {
full_path = g_build_filename (base_path, data_file, NULL);
} else {
- full_path = data_file;
- data_file = NULL;
+ full_path = g_strdup (data_file);
}
if (g_stat (full_path, &stat_buf) < 0) {
g_simple_async_result_set_error (G_SIMPLE_ASYNC_RESULT (result),
GRL_NET_WC_ERROR,
GRL_NET_WC_ERROR_NOT_FOUND,
- "%s",
- _("Could not access mock content"));
+ _("Could not access mock content: %s"),
+ data_file);
g_simple_async_result_complete_in_idle (G_SIMPLE_ASYNC_RESULT (result));
g_object_unref (result);
g_free (new_url);