mirror of
https://github.com/aristocratos/btop.git
synced 2024-09-28 22:21:35 +02:00
Fixed: Ignore duplicate disks with same mountpoint
This commit is contained in:
parent
f7860f9d1b
commit
4e7a212f83
@ -885,6 +885,9 @@ namespace Mem {
|
||||
while (not diskread.eof()) {
|
||||
std::error_code ec;
|
||||
diskread >> dev >> mountpoint >> fstype;
|
||||
diskread.ignore(SSmax, '\n');
|
||||
|
||||
if (v_contains(found, mountpoint)) continue;
|
||||
|
||||
//? Match filter if not empty
|
||||
if (not filter.empty()) {
|
||||
@ -918,7 +921,6 @@ namespace Mem {
|
||||
}
|
||||
|
||||
}
|
||||
diskread.ignore(SSmax, '\n');
|
||||
}
|
||||
//? Remove disks no longer mounted or filtered out
|
||||
if (swap_disk and has_swap) found.push_back("swap");
|
||||
@ -1494,7 +1496,7 @@ namespace Proc {
|
||||
if (not pread.good()) continue;
|
||||
long_string.clear();
|
||||
while(getline(pread, long_string, '\0')) {
|
||||
new_proc.cmd += long_string + ' ';
|
||||
new_proc.cmd += long_string + ' ';
|
||||
if (new_proc.cmd.size() > 1000) {
|
||||
new_proc.cmd.resize(1000);
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user