Guard browser OPFS default machine path helper
This commit is contained in:
@@ -4480,9 +4480,9 @@
|
||||
|
||||
function assertMachineTextStorePaths(label, paths, machineId) {
|
||||
const expectedPaths = {
|
||||
ini: `linuxcnc/machines/${machineId}/machine.ini`,
|
||||
toolTable: `linuxcnc/machines/${machineId}/tool.tbl`,
|
||||
parameters: `linuxcnc/machines/${machineId}/linuxcnc.var`,
|
||||
ini: opfsMachineFilePath(machineId, "machine.ini"),
|
||||
toolTable: opfsMachineFilePath(machineId, "tool.tbl"),
|
||||
parameters: opfsMachineFilePath(machineId, "linuxcnc.var"),
|
||||
};
|
||||
for (const [name, expectedPath] of Object.entries(expectedPaths)) {
|
||||
if (paths[name] !== expectedPath) {
|
||||
@@ -4591,9 +4591,9 @@
|
||||
throw new Error(`${label}: unexpected machine id ${session.machineId}`);
|
||||
}
|
||||
const expectedOpfsPaths = {
|
||||
ini: `linuxcnc/machines/${machineId}/machine.ini`,
|
||||
parameters: `linuxcnc/machines/${machineId}/linuxcnc.var`,
|
||||
toolTable: `linuxcnc/machines/${machineId}/tool.tbl`,
|
||||
ini: opfsMachineFilePath(machineId, "machine.ini"),
|
||||
parameters: opfsMachineFilePath(machineId, "linuxcnc.var"),
|
||||
toolTable: opfsMachineFilePath(machineId, "tool.tbl"),
|
||||
...(expectedPaths.opfs ?? {}),
|
||||
};
|
||||
assertOpfsIniStaging(
|
||||
|
||||
Reference in New Issue
Block a user