Skip to content

Commit 76f1316

Browse files
authored
Merge pull request #185 from fflewddur/sshfs-fix
Fix sshfs mounts from interrupting the disk monitor
2 parents 1730034 + 80ee3fd commit 76f1316

File tree

3 files changed

+4
-1
lines changed

3 files changed

+4
-1
lines changed

RELEASES.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ based on [Keep a Changelog].
55

66
## TopHat vNext - Unreleased
77

8+
- Fixed disk monitor problem with sshfs mounts
89
- Added German translation (from [theinfamousben](https://github.com/theinfamousben))
910

1011
## TopHat 21 - February 23, 2025

src/extension.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ export default class TopHat extends Extension {
9292
const base = '/sys/class/hwmon/';
9393
const hwmon = new File(base);
9494
hwmon.listSync().forEach((filename) => {
95+
// TODO: Add unit tests for each known temperature sensor configuration
9596
const name = new File(`${base}${filename}/name`).readSync();
9697
if (name === 'coretemp') {
9798
// Intel CPUs

src/helpers.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,8 @@ export async function readFileSystems(): Promise<FSUsage[]> {
140140
Gio.SubprocessFlags.STDOUT_PIPE
141141
);
142142
proc.communicate_utf8_async(null, null).then(([stdout]) => {
143-
if (proc.get_successful()) {
143+
// Try to process the output even if the exit status != 0
144+
if (stdout) {
144145
const output = stdout as unknown as string;
145146
const lines = output.split('\n');
146147
for (const line of lines) {

0 commit comments

Comments
 (0)