DiskUsage: ignore files from other volumes
This allows us to get meaningful result for the system volume, which would otherwise scan both hpkg files, and their whole contents as mounted in the system/ hierarchy. Now only the packages are seen. Directories are not ignored, so system/ (which is a different mount point) will still be browsed, and system/packages (which is a shine-through) will be found and counted in the used space.
This commit is contained in:
parent
4bcba8a84f
commit
af960311c0
@ -246,7 +246,11 @@ Scanner::_GetFileInfo(BDirectory* dir, FileInfo* parent)
|
||||
if (entry.IsSymLink())
|
||||
continue;
|
||||
|
||||
|
||||
if (entry.IsFile()) {
|
||||
entry_ref ref;
|
||||
if ((entry.GetRef(&ref) == B_OK) && (ref.device != Device()))
|
||||
continue;
|
||||
FileInfo *child = new FileInfo;
|
||||
entry.GetRef(&child->ref);
|
||||
entry.GetSize(&child->size);
|
||||
|
Loading…
Reference in New Issue
Block a user