QStorageInfo/Linux: move retrieveVolumeInfo() up because it won't fail
initRootPath() may fail, so let's make sure we do extract some
information from the FS even if that does. Issue introduced by
3e330a79ec ("QStorageInfo/Linux: rewrite
the label retriever to use device IDs")
Task-number: QTBUG-121140
Pick-to: 6.7
Change-Id: I76ffba14ece04f24b43efffd17ab2df71af8c4e0
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
bb10
parent
a7e429e5a3
commit
264b7a6733
|
|
@ -136,11 +136,11 @@ static inline QString retrieveLabel(const QByteArray &device, quint64 deviceId)
|
|||
|
||||
void QStorageInfoPrivate::doStat()
|
||||
{
|
||||
retrieveVolumeInfo();
|
||||
quint64 deviceId = initRootPath();
|
||||
if (!deviceId)
|
||||
return;
|
||||
|
||||
retrieveVolumeInfo();
|
||||
name = retrieveLabel(device, deviceId);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue