Case closed.
It is a Qt bug to use opendir (src/corelib/io/qfsfileengine_iterator_unix.cpp) trying to access directory in large filesystem.
scandir64 fixes the problem
static QStringList getFileList
( const char* dirname,
const QRegExp
& filter
) {
struct dirent64 **namelist=NULL;
int sz = scandir64( dirname, &namelist, 0 , alphasort );
for ( int idx=0; idx < sz; idx++ ) {
if ( QString( namelist
[idx
]->d_name
).
contains( filter
) ) { fullpath += "/";
fullpath += namelist[idx]->d_name;
fileList << fullpath;
}
}
if ( sz > 0 ) {
while( sz-- ) {
free( namelist[sz] );
}
free( namelist );
}
return fileList;
} // getFileList
static QStringList getFileList( const char* dirname, const QRegExp& filter )
{
QStringList fileList;
struct dirent64 **namelist=NULL;
int sz = scandir64( dirname, &namelist, 0 , alphasort );
for ( int idx=0; idx < sz; idx++ ) {
if ( QString( namelist[idx]->d_name ).contains( filter ) ) {
QString fullpath( dirname );
fullpath += "/";
fullpath += namelist[idx]->d_name;
fileList << fullpath;
}
}
if ( sz > 0 ) {
while( sz-- ) {
free( namelist[sz] );
}
free( namelist );
}
return fileList;
} // getFileList
To copy to clipboard, switch view to plain text mode
Bookmarks