mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-03 02:15:43 -04:00
don't pollute search path with empty names
This commit is contained in:
parent
31bfe77f1d
commit
df6f1ca597
@ -108,9 +108,11 @@ reload_implicit_pages() {
|
||||
ConfigDeclaration::extract_words(prc_dir_envvars, prc_dir_envvar_list);
|
||||
for (size_t i = 0; i < prc_dir_envvar_list.size(); i++) {
|
||||
string prc_dir = ExecutionEnvironment::get_environment_variable(prc_dir_envvar_list[i]);
|
||||
if (!prc_dir.empty()) {
|
||||
_search_path.append_directory(Filename::from_os_specific(prc_dir));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// PRC_PATH_ENVVARS lists one or more environment variables separated
|
||||
// by spaces. Pull them out, and then each one of those contains a
|
||||
@ -122,9 +124,11 @@ reload_implicit_pages() {
|
||||
ConfigDeclaration::extract_words(prc_path_envvars, prc_path_envvar_list);
|
||||
for (size_t i = 0; i < prc_path_envvar_list.size(); i++) {
|
||||
string prc_path = ExecutionEnvironment::get_environment_variable(prc_path_envvar_list[i]);
|
||||
if (!prc_path.empty()) {
|
||||
_search_path.append_path(prc_path);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (_search_path.is_empty()) {
|
||||
// If nothing's on the search path (PRC_DIR and PRC_PATH were not
|
||||
|
Loading…
x
Reference in New Issue
Block a user