forked from mirrors/gio-qt
fix: when query_info throw NOT_FOUND cond.wakeAll() will never call
This commit is contained in:
parent
6dee1e99c3
commit
7ad783765d
1 changed files with 6 additions and 1 deletions
|
@ -239,7 +239,12 @@ QExplicitlySharedDataPointer<DGioFileInfo> DGioFile::createFileInfo(QString attr
|
|||
QtConcurrent::run([&] {
|
||||
QTime t;
|
||||
t.start();
|
||||
gmmFileInfo = d->getGmmFileInstance()->query_info(attr.toStdString(), flags);
|
||||
try {
|
||||
gmmFileInfo = d->getGmmFileInstance()->query_info(attr.toStdString(), flags);
|
||||
} catch (const Glib::Error &error) {
|
||||
qDebug() << QString::fromStdString(error.what().raw());
|
||||
}
|
||||
|
||||
if (t.elapsed() < timeout_msec) {
|
||||
cond.wakeAll();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue