judge: update etags file on delete (#1021)

This commit is contained in:
BlackPanda authored and GitHub committed 2025-08-01 05:03:25 +01:00
1 parent af30431181
commit 9cf7d70f41
1 file changed
+3 -1
+3 -1
View File
@@ -131,9 +131,11 @@ export class JudgeTask {
files.filter((i) => filenames.includes(i.name)) files.filter((i) => filenames.includes(i.name))
.map((i) => [i.name, join(filePath, i.name)]), .map((i) => [i.name, join(filePath, i.name)]),
)); ));
await fs.writeFile(join(filePath, 'etags'), JSON.stringify(version));
this.compileCache = {}; this.compileCache = {};
} }
if (allFilesToRemove.length || filenames.length) {
await fs.writeFile(join(filePath, 'etags'), JSON.stringify(version));
}
await fs.writeFile(join(filePath, 'lastUsage'), Date.now().toString()); await fs.writeFile(join(filePath, 'lastUsage'), Date.now().toString());
return filePath; return filePath;
} catch (e) { } catch (e) {