diff options
| author | Thiago Macieira <thiago.macieira@intel.com> | 2023-10-12 15:58:34 -0700 |
|---|---|---|
| committer | Thiago Macieira <thiago.macieira@intel.com> | 2023-10-21 15:21:39 -0700 |
| commit | feb67bbdd202ac708cbf41f5698c4e2246ad4232 (patch) | |
| tree | 228dd0e80ce5b5ff868e880e9a22b30d6a33adf7 /src/corelib/serialization/qdatastream.cpp | |
| parent | 39843b65f4b04a5d92d5a867131ba83cd3b92a02 (diff) | |
QStorageInfo/Unix: exclude invalid volumes from mountedVolumes()
Invalid are usually those mounted on a filesystem we can't access:
$ df /run/user/0/gvfs
df: /run/user/0/gvfs: Permission denied
$ ./qstorageinfo /run/user/0/gvfs
Could not get info on /run/user/0/gvfs
df already doesn't include it by default:
$ df | grep -c gvfs
0
But we were:
$./qstorageinfo | sed -n '1p;/gvfs/p'
Filesystem (Type) Size Available BSize Label Mounted on
gvfsd-fuse (fuse.gvfsd-fuse) RW 0 0 0 /run/user/0/gvfs
Note also how this is showing a total size of 0, which is usually the
type of filesystem we exclude. It's actually -1 but got rounded down to
0 when we divided by 1024.
Pick-to: 6.6
Change-Id: I8f3ce163ccc5408cac39fffd178d7e4f9dc13b24
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
Diffstat (limited to 'src/corelib/serialization/qdatastream.cpp')
0 files changed, 0 insertions, 0 deletions
