diff --git a/lib/filesystem.js b/lib/filesystem.js index 3717b90..b84baf9 100644 --- a/lib/filesystem.js +++ b/lib/filesystem.js @@ -137,7 +137,7 @@ function fsSize(drive, callback) { } } if (_linux) { - cmd = 'df -lkPTx squashfs'; + cmd = 'export LC_ALL=C; df -lkPTx squashfs; unset LC_ALL'; execSync('cat /proc/mounts 2>/dev/null').toString().split('\n').filter(line => { return line.startsWith('/'); }).forEach((line) => { @@ -158,7 +158,7 @@ function fsSize(drive, callback) { return item.fs.toLowerCase().indexOf(drive.toLowerCase()) >= 0 || item.mount.toLowerCase().indexOf(drive.toLowerCase()) >= 0; }); } - if (!error || data.length) { + if ((!error || data.length) && stdout.toString().toLowerCase().indexOf('unrecognized option') === -1) { if (callback) { callback(data); }