diff options
-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); |