mirror of
https://github.com/thorvg/thorvg.git
synced 2025-06-13 19:44:28 +00:00
example: do not scan a given resource folder recursively
This commit is contained in:
parent
c36bc1a7a3
commit
7556253c53
1 changed files with 2 additions and 12 deletions
|
@ -89,12 +89,7 @@ struct Example
|
|||
}
|
||||
do {
|
||||
if (*fd.cFileName == '.' || *fd.cFileName == '$') continue;
|
||||
if (fd.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) {
|
||||
auto subpath = string(path);
|
||||
subpath += '\\';
|
||||
subpath += fd.cFileName;
|
||||
scandir(subpath.c_str());
|
||||
} else {
|
||||
if (!(fd.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)) {
|
||||
auto fullpath = string(path);
|
||||
fullpath += '\\';
|
||||
fullpath += fd.cFileName;
|
||||
|
@ -113,12 +108,7 @@ struct Example
|
|||
struct dirent* entry;
|
||||
while ((entry = readdir(dir)) != NULL) {
|
||||
if (*entry->d_name == '.' || *entry->d_name == '$') continue;
|
||||
if (entry->d_type == DT_DIR) {
|
||||
auto subpath = string(path);
|
||||
subpath += '/';
|
||||
subpath += entry->d_name;
|
||||
scandir(subpath.c_str());
|
||||
} else {
|
||||
if (entry->d_type != DT_DIR) {
|
||||
auto fullpath = string(path);
|
||||
fullpath += '/';
|
||||
fullpath += entry->d_name;
|
||||
|
|
Loading…
Add table
Reference in a new issue