summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlastair Poole <netstar@gmail.com>2021-01-30 11:14:37 +0000
committerAlastair Poole <netstar@gmail.com>2021-01-30 11:14:37 +0000
commit9dd7919981cabe74fad2747a5ab6969db3555b8f (patch)
tree1bfa74ce02ec6fb7a61b722ddde2be76f9d9cdff
parentf13e49f97fd665128fe17af7fd5be497d9474473 (diff)
main: elm_quit if no media found with recursive add.
This solves an issue whereby a user who associates a file:// uri with rage, can open a link. A slow traversal *can* mean a long and often unexpected delayed open of Rage.
-rw-r--r--src/bin/main.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/bin/main.c b/src/bin/main.c
index 4481984..1cfe68a 100644
--- a/src/bin/main.c
+++ b/src/bin/main.c
@@ -104,10 +104,16 @@ _cb_start_recursion(void *data, Ecore_Thread *thread EINA_UNUSED)
104static void 104static void
105_cb_end_recursion(void *data, Ecore_Thread *thread EINA_UNUSED) 105_cb_end_recursion(void *data, Ecore_Thread *thread EINA_UNUSED)
106{ 106{
107 Recursion_Data *recursion = data; 107 Recursion_Data *recursion;
108 Eina_Bool have_media;
109
110 recursion = data;
111 have_media = recursion->have_media_files;
108 112
109 free(recursion->realpath); 113 free(recursion->realpath);
110 free(recursion); 114 free(recursion);
115 if (!have_media)
116 elm_exit();
111} 117}
112 118
113static void 119static void