[gnome-commander] Do not execute command in commandline if it is empty
- From: Uwe Scholz <uwescholz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-commander] Do not execute command in commandline if it is empty
- Date: Sun, 10 Sep 2017 20:16:14 +0000 (UTC)
commit 315ee39acd549ffb16f4407f392bc2319e1427d2
Author: Uwe Scholz <uwescholz src gnome org>
Date: Sun Sep 10 21:32:57 2017 +0200
Do not execute command in commandline if it is empty
src/utils.cc | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/src/utils.cc b/src/utils.cc
index cb4319d..cba724e 100644
--- a/src/utils.cc
+++ b/src/utils.cc
@@ -89,6 +89,9 @@ void DEBUG (gchar flag, const gchar *format, ...)
*/
void run_command_indir (const gchar *in_command, const gchar *dpath, gboolean term)
{
+ g_return_if_fail (in_command != NULL);
+ g_return_if_fail (strlen(in_command) != 0);
+
gchar *command;
if (term)
@@ -119,7 +122,7 @@ void run_command_indir (const gchar *in_command, const gchar *dpath, gboolean te
command = g_strdup (in_command);
DEBUG ('g', "running%s: %s\n", (term?" in terminal":""), command);
-
+
gint argc;
gchar **argv;
GError *error = NULL;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]