system: check if mountpoint is array

This commit is contained in:
Girish Ramakrishnan
2025-07-19 13:06:22 +02:00
parent 4f608bdc5f
commit 1e8df5c9d0
+2 -2
View File
@@ -333,8 +333,8 @@ async function getBlockDevices() {
size: d.fsavail || 0,
type: d.fstype,
uuid: d.uuid,
rota: d.rota, // false (ssd) true (hdd)
mountpoint: d.mountpoints ? d.mountpoints.pop() : d.mountpoint // we only support one mountpoint here old lsblk only exposed one via .mountpoint
rota: d.rota, // false (ssd) true (hdd) . unforuntately, this is not set correctly when virtualized (like in DO)
mountpoint: Array.isArray(d.mountpoints) ? d.mountpoints[0] : d.mountpoint // we only support one mountpoint here old lsblk only exposed one via .mountpoint
};
});
}