Also include potential swap files in the disk usage stats
This commit is contained in:
@@ -114,6 +114,15 @@ async function getDisks() {
|
||||
disks[dfResult?.filesystem || rootDisk.filesystem].contents.push({ type: 'app', id: app.id, path: dataDir });
|
||||
}
|
||||
|
||||
const swaps = await getSwaps();
|
||||
for (const k in swaps) {
|
||||
const swap = swaps[k];
|
||||
if (swap.type !== 'file') continue;
|
||||
|
||||
const [, dfResult] = await safe(df.file(swap.name));
|
||||
disks[dfResult?.filesystem || rootDisk.filesystem].contents.push({ type: 'swap', id: swap.name, path: swap.name });
|
||||
}
|
||||
|
||||
return disks;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user