From 67e6dce992daee4c184f42012b3ce4867b1f1dab Mon Sep 17 00:00:00 2001 From: Scoopta Date: Sat, 17 Aug 2019 20:22:36 -0700 Subject: [PATCH] Fixed some minor issues with run --- src/wofi.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/wofi.c b/src/wofi.c index 3dc3b9d..aa3e218 100644 --- a/src/wofi.c +++ b/src/wofi.c @@ -58,7 +58,7 @@ static void do_run(GtkWidget* box) { for(size_t count = 0; count < colon_count; ++count) { DIR* dir = opendir(path); if(dir == NULL) { - continue; + goto cont; } struct dirent* entry; while((entry = readdir(dir)) != NULL) { @@ -76,6 +76,8 @@ static void do_run(GtkWidget* box) { } free(full_path); } + closedir(dir); + cont: path += strlen(path) + 1; } free(original_path);