auroraab788ce
aurora: open encrypted drives after mounting from the panel
+2 −1
1 file changed
| @@ -26,9 +26,10 @@ Singleton { | |||
| 26 | 26 | function mount(key, thenOpen) { | |
| 27 | 27 | run(["mounter", key], "", () => { if (thenOpen) openLater.key = key }) | |
| 28 | 28 | } | |
| 29 | + | // a LUKS key (/dev/sda2) also matches its unlocked mapper, whose row replaces it after mounting | |
| 29 | 30 | function open(key) { | |
| 30 | 31 | for (var i = 0; i < drives.length; i++) | |
| 31 | − | if (drives[i].key === key && drives[i].mount !== "") { xdgOpen(drives[i].mount); return true } | |
| 32 | + | if ((drives[i].key === key || drives[i].luksParent === key) && drives[i].mount !== "") { xdgOpen(drives[i].mount); return true } | |
| 32 | 33 | for (i = 0; i < phones.length; i++) | |
| 33 | 34 | if (phones[i].key === key && phones[i].mounted) { xdgOpen(phones[i].path); return true } | |
| 34 | 35 | return false | |