@samitouri / QOSami-HFS / commits / 4a35a466

fix: admin/shared: on Windows, couldn't select a drive from the drive list

Massimo Melina committed Jul 4, 2025 at 12:01 UTC 4a35a4665bd37101459e9f0640c719b3a6877bee
1 file changed +1 -1
admin/src/FilePicker.ts
+1 -1
@@ -143,7 +143,7 @@ export default function FilePicker({ onSelect, multiple=true, files=true, folder
143 h(Flex, { alignItems: 'stretch' },
144 (multiple || folders || !files) && h(Button, {
145 variant: 'contained',
146 - disabled: !cwd || !folders && !sel.length && files,
146 + disabled: !sel.length && (!cwd || !folders && files), // !cwd is the drive selection on Windows, which is not a path
147 sx: { minWidth: 'max-content' },
148 onClick() {
149 onSelect(sel.length ? sel.map(x => cwdDelimiter + x) : [cwd])