fix double drive_c issues

This commit is contained in:
olcxja 2026-10-03 08:43:19 +02:00
commit f2145d6678
7 changed files with 73 additions and 33 deletions

View file

@ -783,7 +783,10 @@ async function doImport(srcDir, mode) {
closeModal()
if (!game || game.ok === false) {
const raw = (game && game.error) || ''
const errText = raw === 'no-exe-found' ? t('import.noExe') : (raw || 'unknown error')
const errText =
raw === 'no-exe-found' ? t('import.noExe')
: raw === 'prefix-root' ? t('import.prefixRoot')
: (raw || 'unknown error')
toast(t('import.failed', errText), 'error')
return
}
@ -923,7 +926,8 @@ async function doPrefixImport(prefix, srcDir) {
const errText =
raw === 'no-exe-found' ? t('import.noExe')
: raw === 'no-drive-c' ? t('import.prefix.noDriveC')
: t('import.prefix.outside')
: raw === 'outside-drive-c' ? t('import.prefix.outside')
: (raw || 'unknown error')
toast(t('import.failed', errText), 'error')
return
}