summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Davenport <qball@gmpclient.org>2017-01-17 20:00:00 +0100
committerDave Davenport <qball@gmpclient.org>2017-01-17 20:00:00 +0100
commit253724c85c45cced52fa42d40ec897c8f4a6e832 (patch)
tree663257c28943e333b1d51361ebf82951c3273b3c
parent37c20740e4c7de8fadf406cb6448b1a501434ffa (diff)
Ignore empty path.
Not in spec. but lets ignore it. Fix: #539
-rw-r--r--source/dialogs/drun.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/source/dialogs/drun.c b/source/dialogs/drun.c
index 5aa4dac7..1df1b88f 100644
--- a/source/dialogs/drun.c
+++ b/source/dialogs/drun.c
@@ -194,6 +194,12 @@ static void exec_cmd_entry ( DRunModeEntry *e )
}
gchar *fp = rofi_expand_path ( g_strstrip ( str ) );
gchar *exec_path = g_key_file_get_string ( e->key_file, "Desktop Entry", "Path", NULL );
+ if ( exec_path != NULL && strlen(exec_path) == 0){
+ // If it is empty, ignore this property. (#529)
+ g_free(exec_path);
+ exec_path = NULL;
+ }
+
if ( execsh ( exec_path, fp, e->terminal ) ) {
char *path = g_build_filename ( cache_dir, DRUN_CACHE_FILE, NULL );
char *key = g_strdup_printf ( "%s:::%s", e->root, e->path );