diff options
author | Chris Robinson <[email protected]> | 2015-10-04 17:24:12 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2015-10-04 17:24:12 -0700 |
commit | f590af510dcae8a64c833d78c0a1238c281eea27 (patch) | |
tree | 8f0141e94905c12323e665551e31de7309d848a8 /Alc/helpers.c | |
parent | 074983b19c4a838f1a26cfa5afb879808dfc2fd1 (diff) |
Skip empty data directory entries
Diffstat (limited to 'Alc/helpers.c')
-rw-r--r-- | Alc/helpers.c | 9 |
1 files changed, 6 insertions, 3 deletions
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); |