From 7d5472b204302c0db8c329fd0978ac63d1f221d2 Mon Sep 17 00:00:00 2001 From: mgrotke Date: Tue, 28 Jan 2025 01:53:33 -0500 Subject: [PATCH] Prevented the possibility of drive printing that does not have any active mounts --- devices/get_device_info.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/devices/get_device_info.lua b/devices/get_device_info.lua index 61626cc..c0b4e86 100644 --- a/devices/get_device_info.lua +++ b/devices/get_device_info.lua @@ -151,7 +151,8 @@ function conky_get_drives_and_volumes() if dtype == "disk" then parent_drive = name devices[parent_drive] = { mountpoints = {} } - elseif dtype == "part" and parent_drive and mount and mount ~= "" then + elseif dtype == "part" and pkname == parent_drive and mount and mount ~= "" then + -- Only consider partitions with a non-empty mount point table.insert(devices[parent_drive].mountpoints, mount) elseif dtype == "dm" and pkname and mount and mount ~= "" then -- Associate device-mapper (dm) devices with their parent physical disk