mirror of
https://github.com/MCSManager/MCSManager.git
synced 2025-02-17 15:59:41 +08:00
fix: disk test ignore error
This commit is contained in:
parent
705b4988b0
commit
6bc247a98e
@ -23,7 +23,11 @@ export function getWindowsDisks() {
|
||||
// A - Z
|
||||
for (let i = 65; i <= 90; i++) {
|
||||
const letter = String.fromCharCode(i);
|
||||
if (fs.existsSync(`${letter}:\\`)) res.push(letter);
|
||||
try {
|
||||
if (fs.existsSync(`${letter}:\\`)) res.push(letter);
|
||||
} catch (error) {
|
||||
// ignore error
|
||||
}
|
||||
}
|
||||
cacheDisks = res;
|
||||
return res;
|
||||
|
Loading…
Reference in New Issue
Block a user