fix: use random restart intent temp suffix · openclaw/openclaw@de652af
steipete
·
2026-04-25
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
|
1 | 1 | import { spawnSync } from "node:child_process"; |
| 2 | +import { randomUUID } from "node:crypto"; |
2 | 3 | import fs from "node:fs"; |
3 | 4 | import os from "node:os"; |
4 | 5 | import path from "node:path"; |
@@ -120,9 +121,7 @@ export function writeGatewayRestartIntentSync(opts: {
|
120 | 121 | }; |
121 | 122 | tmpPath = path.join( |
122 | 123 | path.dirname(intentPath), |
123 | | -`.${path.basename(intentPath)}.${process.pid}.${Date.now()}.${Math.random() |
124 | | - .toString(16) |
125 | | - .slice(2)}.tmp`, |
| 124 | +`.${path.basename(intentPath)}.${process.pid}.${Date.now()}.${randomUUID()}.tmp`, |
126 | 125 | ); |
127 | 126 | let fd: number | undefined; |
128 | 127 | try { |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。