fix(skills): remove checkpoint helper dead code
This commit is contained in:
@@ -184,13 +184,12 @@ async function readExisting(io, target) {
|
||||
}
|
||||
|
||||
async function openUniqueTemp(io, target) {
|
||||
const directory = dirname(target);
|
||||
for (let attempt = 0; attempt < MAX_TEMP_NAME_ATTEMPTS; attempt += 1) {
|
||||
const id = io.randomUUID();
|
||||
const path = `${target}.tmp-${process.pid}-${id}`;
|
||||
try {
|
||||
const handle = await io.open(path, "wx", FILE_MODE);
|
||||
return { path, handle, directory };
|
||||
return { path, handle };
|
||||
} catch (error) {
|
||||
// A collision is not stale-file cleanup. Leave the old file alone and try a new name.
|
||||
if (isAlreadyExists(error)) continue;
|
||||
|
||||
Reference in New Issue
Block a user