Guard browser OPFS custom session wasm path locals

This commit is contained in:
2026-06-14 01:40:22 +08:00
parent cba5dc96c7
commit ef4d1c7829
2 changed files with 61 additions and 8 deletions

View File

@@ -9439,6 +9439,8 @@
const iniFileParameterFilename = "browser-custom.var";
const iniFileToolTableFilename = "browser-custom-tool.tbl";
const iniFileIniWasmPath = opfsMachineIniWasmPath(iniFileMachineId);
const iniFileParameterWasmPath = opfsCustomSessionWasmPath(iniFileParameterFilename);
const iniFileToolTableWasmPath = opfsCustomSessionWasmPath(iniFileToolTableFilename);
const browserIniFileTextPaths = await saveMachineTextFiles(iniFileMachineId, {
ini: [
"[EMC]",
@@ -9480,8 +9482,8 @@
{
iniSdk: ini,
iniWasmPath: iniFileIniWasmPath,
parameterWasmPath: opfsCustomSessionWasmPath(iniFileParameterFilename),
toolTableWasmPath: opfsCustomSessionWasmPath(iniFileToolTableFilename),
parameterWasmPath: iniFileParameterWasmPath,
toolTableWasmPath: iniFileToolTableWasmPath,
},
);
assertOpfsSessionStaging(
@@ -9526,7 +9528,7 @@
savedIniNamedParameters,
iniFileMachineId,
iniFileParameterFilename,
opfsCustomSessionWasmPath(iniFileParameterFilename),
iniFileParameterWasmPath,
);
verifyOpfsSaveResult(
"opfs_save_ini_named_parameter_file",
@@ -9584,7 +9586,7 @@
savedIniNamedToolTable,
iniFileMachineId,
iniFileToolTableFilename,
opfsCustomSessionWasmPath(iniFileToolTableFilename),
iniFileToolTableWasmPath,
);
verifyOpfsSaveResult(
"opfs_save_ini_named_tool_table",
@@ -9611,6 +9613,8 @@
const explicitParameterFilename = "browser-explicit.var";
const explicitToolTableFilename = "browser-explicit-tool.tbl";
const iniOverrideIniWasmPath = opfsMachineIniWasmPath(iniOverrideMachineId);
const explicitParameterWasmPath = opfsCustomSessionWasmPath(explicitParameterFilename);
const explicitToolTableWasmPath = opfsCustomSessionWasmPath(explicitToolTableFilename);
const browserIniOverrideTextPaths = await saveMachineTextFiles(iniOverrideMachineId, {
ini: [
"[EMC]",
@@ -9653,9 +9657,9 @@
iniSdk: ini,
iniWasmPath: iniOverrideIniWasmPath,
parameterFilename: explicitParameterFilename,
parameterWasmPath: opfsCustomSessionWasmPath(explicitParameterFilename),
parameterWasmPath: explicitParameterWasmPath,
toolTableFilename: explicitToolTableFilename,
toolTableWasmPath: opfsCustomSessionWasmPath(explicitToolTableFilename),
toolTableWasmPath: explicitToolTableWasmPath,
},
);
assertOpfsSessionStaging(
@@ -9712,7 +9716,7 @@
savedExplicitParameters,
iniOverrideMachineId,
explicitParameterFilename,
opfsCustomSessionWasmPath(explicitParameterFilename),
explicitParameterWasmPath,
);
verifyOpfsSaveResult(
"opfs_save_explicit_parameter_file",
@@ -9758,7 +9762,7 @@
savedExplicitToolTable,
iniOverrideMachineId,
explicitToolTableFilename,
opfsCustomSessionWasmPath(explicitToolTableFilename),
explicitToolTableWasmPath,
);
verifyOpfsSaveResult(
"opfs_save_explicit_tool_table",