mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-04 19:08:55 -04:00
scan_directory from empty means current dir
This commit is contained in:
parent
74c527d72b
commit
d2511eda84
@ -1065,7 +1065,13 @@ scan_directory(vector_string &contents) const {
|
|||||||
#if defined(HAVE_DIRENT_H)
|
#if defined(HAVE_DIRENT_H)
|
||||||
size_t orig_size = contents.size();
|
size_t orig_size = contents.size();
|
||||||
|
|
||||||
DIR *root = opendir(_filename.c_str());
|
string dirname;
|
||||||
|
if (empty()) {
|
||||||
|
dirname = ".";
|
||||||
|
} else {
|
||||||
|
dirname = _filename;
|
||||||
|
}
|
||||||
|
DIR *root = opendir(dirname.c_str());
|
||||||
if (root == (DIR *)NULL) {
|
if (root == (DIR *)NULL) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user