mirror of
https://github.com/QwenLM/qwen-code.git
synced 2025-12-21 09:17:53 +00:00
fix file extension in "modify flow" temp files (#2478)
This commit is contained in:
@@ -58,15 +58,16 @@ function createTempFilesForModify(
|
||||
fs.mkdirSync(diffDir, { recursive: true });
|
||||
}
|
||||
|
||||
const fileName = path.basename(file_path);
|
||||
const ext = path.extname(file_path);
|
||||
const fileName = path.basename(file_path, ext);
|
||||
const timestamp = Date.now();
|
||||
const tempOldPath = path.join(
|
||||
diffDir,
|
||||
`gemini-cli-modify-${fileName}-old-${timestamp}`,
|
||||
`gemini-cli-modify-${fileName}-old-${timestamp}${ext}`,
|
||||
);
|
||||
const tempNewPath = path.join(
|
||||
diffDir,
|
||||
`gemini-cli-modify-${fileName}-new-${timestamp}`,
|
||||
`gemini-cli-modify-${fileName}-new-${timestamp}${ext}`,
|
||||
);
|
||||
|
||||
fs.writeFileSync(tempOldPath, currentContent, 'utf8');
|
||||
|
||||
Reference in New Issue
Block a user