judge: fix support for node12

This commit is contained in:
undefined committed 2022-02-14 06:22:05 +08:00
1 parent 4e7c3077f9
commit ee8e6ebe8d
3 files changed
+3 -3

No files matched your search

+1 -1
View File
@@ -206,7 +206,7 @@ export default class Hydro {
if (etags[file.name] !== file.etag + file.lastModified) filenames.push(file.name);
}
for (const name in etags) {
if (!allFiles.has(name) && fs.existsSync(path.join(filePath, name))) await fs.rm(path.join(filePath, name));
if (!allFiles.has(name) && fs.existsSync(path.join(filePath, name))) await fs.remove(path.join(filePath, name));
}
if (filenames.length) {
log.info(`Getting problem data: ${this.config.host}/${source}`);