diff options
author | Jon Bergli Heier <snakebite@jvnv.net> | 2010-09-03 21:24:09 +0200 |
---|---|---|
committer | Jon Bergli Heier <snakebite@jvnv.net> | 2010-09-03 21:24:09 +0200 |
commit | fd880c0afd2a369738d697bf621d35e473c3ea70 (patch) | |
tree | 78103c4603d68f97859033c6fd5dc0740b75a15a | |
parent | 476c8bf220d4cc2a68e9a1bba823c78d84f507f7 (diff) |
Set error in list_remote() when failing to retrieve list.
-rw-r--r-- | commands.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -47,6 +47,11 @@ static void list_remote(GString *string, gchar *remotehost, gchar *dirname, GErr } gchar **data = server_list(server, dirname); + if(data == NULL) { + *error = g_error_new(commands_quark(), 0, "couldn't retrieve list"); + return; + } + g_debug("got %d results from %s", g_strv_length(data), remotehost); for(gint i = 0; i < g_strv_length(data); i++) { |