From 540a7172424ca83038baa7c6dd238c7dc7b07f0b Mon Sep 17 00:00:00 2001 From: Zoltan Kochan Date: Thu, 6 Nov 2025 00:59:36 +0100 Subject: [PATCH] fix: implemented CR suggestions --- worker/src/start.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/worker/src/start.ts b/worker/src/start.ts index 0ef593ba34..7e38875c64 100644 --- a/worker/src/start.ts +++ b/worker/src/start.ts @@ -354,9 +354,9 @@ function writeV8File (filePath: string, data: unknown): void { // There is actually no need to create the directory in 99% of cases. // So by using cafs API, we'll improve performance. fs.mkdirSync(targetDir, { recursive: true }) - // We remove the "-index.json" from the end of the temp file name + // We remove the "-index.v8" from the end of the temp file name // in order to avoid ENAMETOOLONG errors - const temp = `${filePath.slice(0, -11)}${process.pid}` + const temp = `${filePath.slice(0, -9)}${process.pid}` gfs.writeFileSync(temp, v8.serialize(data)) optimisticRenameOverwrite(temp, filePath) }