fix double drive_c issues
This commit is contained in:
parent
3e054dd9de
commit
f2145d6678
7 changed files with 73 additions and 33 deletions
|
|
@ -260,11 +260,14 @@ function registerIpc({ getWindow, onGamesChanged }) {
|
|||
// shows up for wine as a regular C:\ install
|
||||
ipcMain.handle('games:pickPrefixFolder', async (e, prefix) => {
|
||||
// open the picker straight in the prefix's C: drive (plain wine: top
|
||||
// level, Proton: under pfx/)
|
||||
const driveC = prefixes.prefixDriveRoot(prefix)
|
||||
// level, Proton: under pfx/); a prefix used with BOTH kinds has two of
|
||||
// them, so it opens at the prefix folder - the only spot that keeps
|
||||
// drive_c and pfx/drive_c one click away
|
||||
const driveRoots = prefixes.prefixDriveRoots(prefix)
|
||||
const start = driveRoots.length === 1 ? driveRoots[0] : prefixes.prefixPath(prefix)
|
||||
const res = await dialog.showOpenDialog(getWindow(), {
|
||||
title: i18n.translate(library.loadSettings().language, 'import.pickPrefixFolder'),
|
||||
defaultPath: driveC || prefixes.prefixPath(prefix),
|
||||
defaultPath: start,
|
||||
properties: ['openDirectory']
|
||||
})
|
||||
return res.canceled || !res.filePaths[0] ? null : res.filePaths[0]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue