fix(installer): 런타임 폴더 원본 없을 때 빈 폴더 생성 (assets 준비 실패 완화)
.minecraft/{assets,libraries,versions} 가 없으면(바닐라 미실행/다른 런처 환경)
링크를 건너뛰어 .mc_custom/<dir> 이 아예 없어졌고, 그러면 마인크래프트가
"Unable to prepare assets for download" 로 실패했다(코드 주석에도 명시된 원인).
원본이 없으면 .mc_custom/<dir> 을 빈 폴더로 만들어 런처가 그 gameDir 에 직접
받아가도록 수정. 0.4.20→0.4.21.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -1755,7 +1755,19 @@ async function linkMinecraftRuntimeDirs(customRoot: string): Promise<void> {
|
||||
const src = path.join(mcRoot, dir)
|
||||
const dst = path.join(customRoot, dir)
|
||||
if (!fs.existsSync(src)) {
|
||||
// .minecraft 에 원본이 없으면(바닐라를 한 번도 안 받았거나 런처가 다른 위치를 쓰는
|
||||
// 환경) 링크를 만들 수 없다. 이때 그냥 건너뛰면 .mc_custom/<dir> 이 아예 없어
|
||||
// 런처가 "Unable to prepare assets for download" 로 실패한다. 빈 폴더라도 만들어
|
||||
// 런처가 그 gameDir 에 직접 받아갈 수 있게 한다(없을 때만).
|
||||
sendLog(t('log.runtimeDirMissing', { dir }))
|
||||
try {
|
||||
if (!fs.existsSync(dst)) {
|
||||
await fsp.mkdir(dst, { recursive: true })
|
||||
sendLog(t('log.runtimeDirCreated', { dir }))
|
||||
}
|
||||
} catch (err) {
|
||||
sendLog(t('log.runtimeLinkFail', { dir, message: (err as Error).message }))
|
||||
}
|
||||
continue
|
||||
}
|
||||
let existing: import('node:fs').Stats | null = null
|
||||
|
||||
Reference in New Issue
Block a user