Merge branch 'main' into macos-clang

This commit is contained in:
Jakob P. Liljenberg 2023-12-12 23:05:52 +01:00 committed by GitHub
commit 730af5d4e1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1755,7 +1755,7 @@ namespace Mem {
//? Get disk/partition stats
for (auto it = disks.begin(); it != disks.end(); ) {
auto &[mountpoint, disk] = *it;
if (v_contains(ignore_list, mountpoint)) {
if (v_contains(ignore_list, mountpoint) or disk.name == "swap") {
it = disks.erase(it);
continue;
}
@ -1936,6 +1936,7 @@ namespace Mem {
}
// looking through all files that start with 'objset' to find the one containing `device_name` object stats
try {
for (const auto& file: fs::directory_iterator(zfs_pool_stat_path)) {
filename = file.path().filename();
if (filename.starts_with("objset")) {
@ -1959,6 +1960,8 @@ namespace Mem {
filestream.close();
}
}
}
catch (fs::filesystem_error& e) {}
Logger::debug("Could not read directory: " + zfs_pool_stat_path.string());
return "";