aboutsummaryrefslogtreecommitdiffstats
path: root/Alc
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2015-10-04 17:24:12 -0700
committerChris Robinson <[email protected]>2015-10-04 17:24:12 -0700
commitf590af510dcae8a64c833d78c0a1238c281eea27 (patch)
tree8f0141e94905c12323e665551e31de7309d848a8 /Alc
parent074983b19c4a838f1a26cfa5afb879808dfc2fd1 (diff)
Skip empty data directory entries
Diffstat (limited to 'Alc')
-rw-r--r--Alc/helpers.c9
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);