mirror of https://github.com/djcb/mu.git
* mu-cmd-server: don't raise errors on empty lines
This commit is contained in:
parent
83667fbe83
commit
0cb5f9145e
|
@ -190,7 +190,12 @@ read_command_line (GError **err)
|
||||||
} while (1);
|
} while (1);
|
||||||
|
|
||||||
line = g_string_free (gstr, FALSE);
|
line = g_string_free (gstr, FALSE);
|
||||||
hash = mu_str_parse_arglist (line, err);
|
|
||||||
|
if (!mu_str_is_empty (line))
|
||||||
|
hash = mu_str_parse_arglist (line, err);
|
||||||
|
else
|
||||||
|
hash = NULL;
|
||||||
|
|
||||||
g_free (line);
|
g_free (line);
|
||||||
|
|
||||||
return hash;
|
return hash;
|
||||||
|
@ -1560,7 +1565,11 @@ mu_cmd_server (MuStore *store, MuConfig *opts/*unused*/, GError **err)
|
||||||
* strings. returning NULL indicates an error */
|
* strings. returning NULL indicates an error */
|
||||||
my_err = NULL;
|
my_err = NULL;
|
||||||
args = read_command_line (&my_err);
|
args = read_command_line (&my_err);
|
||||||
if (!args || my_err) {
|
if ((!args || g_hash_table_size(args) == 0) && !my_err) {
|
||||||
|
if (args)
|
||||||
|
g_hash_table_destroy (args);
|
||||||
|
continue;
|
||||||
|
} else if (my_err) {
|
||||||
print_and_clear_g_error (&my_err);
|
print_and_clear_g_error (&my_err);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue