参考所有分组:替换陈旧OPFS参数备份
结论:按 LinuxCNC rs274ngc_pre.cc save_parameters() 先 unlink 旧 .bak 再 link 当前参数文件的语义,浏览器 OPFS 成功保存时总是用解析前主参数文件刷新 .bak;未扩展 smoke 解析行为。 验证:./test-native.sh;./test-linuxcnc-source-link.sh;./test-web-wasm-browser-smoke.sh。
This commit is contained in:
@@ -713,7 +713,7 @@ export async function createWasmSimulator(moduleOptions = {}) {
|
||||
// through the WASM mirror, so preserve the loaded OPFS file here.
|
||||
if (previousParameterFile === null) {
|
||||
await opfs.removeFile(`${parameterPath}.bak`);
|
||||
} else if (!(await opfs.exists(`${parameterPath}.bak`))) {
|
||||
} else {
|
||||
await opfs.writeFile(`${parameterPath}.bak`, previousParameterFile);
|
||||
}
|
||||
return events;
|
||||
|
||||
Reference in New Issue
Block a user