From f590af510dcae8a64c833d78c0a1238c281eea27 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Sun, 4 Oct 2015 17:24:12 -0700 Subject: Skip empty data directory entries --- Alc/helpers.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'Alc') diff --git a/Alc/helpers.c b/Alc/helpers.c index 3c0ee8c7..b0da7b3d 100644 --- a/Alc/helpers.c +++ b/Alc/helpers.c @@ -1102,10 +1102,13 @@ vector_al_string SearchDataFiles(const char *match, const char *subdir) al_string_append_range(&path, str, next); ++next; } - al_string_append_char(&path, '/'); - al_string_append_cstr(&path, subdir); + if(!al_string_empty(path)) + { + al_string_append_char(&path, '/'); + al_string_append_cstr(&path, subdir); - RecurseDirectorySearch(al_string_get_cstr(path), match, &results); + RecurseDirectorySearch(al_string_get_cstr(path), match, &results); + } } al_string_deinit(&path); -- cgit v1.2.3