fix: when query_info throw NOT_FOUND cond.wakeAll() will never call

This commit is contained in:
ck 2019-10-22 20:30:50 +08:00
parent 6dee1e99c3
commit 7ad783765d

View File

@ -239,7 +239,12 @@ QExplicitlySharedDataPointer<DGioFileInfo> DGioFile::createFileInfo(QString attr
QtConcurrent::run([&] { QtConcurrent::run([&] {
QTime t; QTime t;
t.start(); 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) { if (t.elapsed() < timeout_msec) {
cond.wakeAll(); cond.wakeAll();
} }