From 7bd51470749a1a2b9c78d99c583dfd0ad864473e Mon Sep 17 00:00:00 2001 From: jp9000 Date: Thu, 16 Jul 2015 00:45:31 -0700 Subject: [PATCH] libobs: Fix module search to ignore . and .. When globbing for modules, the intent was to ignore the . and .. directories that might also be included in the glob search. It was mistakenly doing a string compare on the 'path' variable which contains the full path, rather than the 'file' variable which just contains the found file itself, so the string compare always failed. --- libobs/obs-module.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libobs/obs-module.c b/libobs/obs-module.c index 7da6fcb4a..81dd51d3a 100644 --- a/libobs/obs-module.c +++ b/libobs/obs-module.c @@ -258,12 +258,12 @@ static void process_found_module(struct obs_module_path *omp, char *parsed_data_dir; bool bin_found = true; - if (strcmp(path, ".") == 0 || strcmp(path, "..") == 0) - return; - file = strrchr(path, '/'); file = file ? (file + 1) : path; + if (strcmp(file, ".") == 0 || strcmp(file, "..") == 0) + return; + dstr_copy(&name, file); if (!directory) { char *ext = strrchr(name.array, '.');