Bugfixes part 3 #209
@@ -372,15 +372,16 @@ PIVector<PIFile::FileInfo> PIDir::entries(const PIRegularExpression & regexp) {
|
||||
closedir(dir);
|
||||
}
|
||||
# else
|
||||
dirent ** list;
|
||||
int cnt = scandir(p.data(),
|
||||
&list,
|
||||
0,
|
||||
dirent ** list = nullptr;
|
||||
int cnt = scandir(p.data(),
|
||||
&list,
|
||||
0,
|
||||
# if defined(MAC_OS) || defined(ANDROID) || defined(BLACKBERRY)
|
||||
alphasort);
|
||||
alphasort);
|
||||
# else
|
||||
versionsort);
|
||||
# endif
|
||||
if (cnt < 0) return ret;
|
||||
for (int i = 0; i < cnt; ++i) {
|
||||
ret << PIFile::fileInfo(dp + PIString(list[i]->d_name));
|
||||
free(list[i]);
|
||||
|
||||
Reference in New Issue
Block a user