fix(launcher): prevent false maintenance_location errors and log details

Exclude stray top-level wtoffline folders when scanning stock sources, block selecting a data folder that equals or contains the client folder during installation (with inline Step 3 feedback), avoid false maintenance_location blocks when an existing installation placed dataPath at an ancestor of copyPath while still protecting nested data folders and data entries, and log the specific reason and paths on every maintenance_location failure.
This commit is contained in:
N0VAN0M4LY committed 2026-12-02 17:10:58 +08:00
1 parent bf2ce539e7
commit 66bbdf7192
12 files changed
+169 -43

No files matched your search

+12 -2
View File
@@ -5,6 +5,7 @@ import {
CopiesSchema,
CopyIdSchema,
CopyNameSchema,
DATA_FOLDER_PROBLEMS,
FolderSizeSchema,
GameFolderInspectionSchema,
InstallProgressSchema,
@@ -85,8 +86,17 @@ export const ipcContract = {
output: TargetFolderInspectionSchema,
},
'install:inspectDataFolder': {
input: z.object({ path: z.string().min(1) }),
output: z.object({ path: z.string(), inSteam: z.boolean() }),
input: z.object({
path: z.string().min(1),
copyPath: z.string().min(1).optional(),
sourcePath: z.string().min(1).optional(),
stockSourcePath: z.string().min(1).optional(),
}),
output: z.object({
path: z.string(),
inSteam: z.boolean(),
problem: z.enum(DATA_FOLDER_PROBLEMS).nullable(),
}),
},
'install:measureFolder': {
input: z.object({ path: z.string().min(1), version: z.string().nullable().optional() }),