win: fix drive listing

This commit is contained in:
jean-emmanuel 2025-04-03 15:39:33 +02:00
parent afc7d677e5
commit 36c89648b8
2 changed files with 4 additions and 2 deletions

View file

@ -2,6 +2,9 @@
## 1.29.0
- bug fixes
- file browser: drive listing failing on recent windows
- widgets
- add `onTouch` to all container widgets
- allow starting a traversing gesture outside a touchable widget

View file

@ -512,8 +512,7 @@ module.exports = {
// Drive list hack on windows
if (data.path.length === 2 && data.path[1] === '..' && (data.path[0].match(/^[A-Z]:\\$/) || data.path[0] === '\\')) {
// child_process.exec('wmic logicaldisk get name', (error, stdout) => {
child_process.exec('(get-wmiobject win32_volume | ? { $_.DriveType -eq 3 } | % { get-psdrive $_.DriveLetter[0] }).Root', {shell: 'powershell.exe'}, (error, stdout) => {
child_process.exec('(get-wmiobject win32_volume | ? { $_.DriveType -eq 3 } | % { get-psdrive $_.DriveLetter[0] }).Root -join " "', {shell: 'powershell.exe'}, (error, stdout) => {
if (error) {