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.
This commit is contained in:
parent
1f1f03d920
commit
7bd5147074
@ -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, '.');
|
||||
|
Loading…
x
Reference in New Issue
Block a user