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 3e330a79ec8d273630660eefae42995018421c0c ("QStorageInfo/Linux: rewrite the label retriever to use device IDs") Task-number: QTBUG-121140 Change-Id: I76ffba14ece04f24b43efffd17ab2df71af8c4e0 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Ahmad Samir <a.samirh78@gmail.com> (cherry picked from commit 264b7a67330fb1a3fd0f896603e75ada46326875) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
parent
b375dac923
commit
d688eab7da
@ -136,11 +136,11 @@ static inline QString retrieveLabel(const QByteArray &device, quint64 deviceId)
|
|||||||
|
|
||||||
void QStorageInfoPrivate::doStat()
|
void QStorageInfoPrivate::doStat()
|
||||||
{
|
{
|
||||||
|
retrieveVolumeInfo();
|
||||||
quint64 deviceId = initRootPath();
|
quint64 deviceId = initRootPath();
|
||||||
if (!deviceId)
|
if (!deviceId)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
retrieveVolumeInfo();
|
|
||||||
name = retrieveLabel(device, deviceId);
|
name = retrieveLabel(device, deviceId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user