installer-rp: rename fallback pack name musicquiz → resourcepack
Per user request: when outputPackName is empty, fall back to `<packKey>_resourcepack` instead of `<packKey>_musicquiz`. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -400,9 +400,9 @@ ipcMain.handle('rp:install:start', async (): Promise<{ resourcepackPath: string
|
||||
// 2-5. 리소스팩 zip 빌드 (pack.mcmeta + sounds.json + 음악·이미지, 베이스 위에 얹기)
|
||||
throwIfCancelled()
|
||||
// 사이트에서 지정한 "생성되는 리소스팩 이름" 을 우선 사용. 비어있거나 sanitize
|
||||
// 결과가 빈 문자열이면 `<packKey>_musicquiz` 로 폴백.
|
||||
// 결과가 빈 문자열이면 `<packKey>_resourcepack` 로 폴백.
|
||||
const sanitizedOutputName = sanitizeOutputPackName(pack.outputPackName)
|
||||
const resourcepackBaseName = sanitizedOutputName || `${state.selectedKey}_musicquiz`
|
||||
const resourcepackBaseName = sanitizedOutputName || `${state.selectedKey}_resourcepack`
|
||||
const resourcepackName = `${resourcepackBaseName}.zip`
|
||||
const resourcepackDir = path.join(getMcCustomDir(), 'resourcepacks')
|
||||
const resourcepackPath = path.join(resourcepackDir, resourcepackName)
|
||||
|
||||
@@ -12,7 +12,7 @@ export interface RpFetchedPack {
|
||||
resourcepackPath: string
|
||||
/**
|
||||
* /manifest/<key>.json 의 outputPackName. 관리 사이트에서 설정한 "생성되는
|
||||
* 리소스팩 이름". 비어 있으면 설치기가 `<key>_musicquiz` 형식으로 폴백.
|
||||
* 리소스팩 이름". 비어 있으면 설치기가 `<key>_resourcepack` 형식으로 폴백.
|
||||
* 파일명으로 쓰기 전에 Windows 금지 문자(\<\>:"/\\|?*) 는 `_` 로 치환.
|
||||
*/
|
||||
outputPackName: string
|
||||
|
||||
Reference in New Issue
Block a user