mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-17 09:36:08 +08:00
judge: fix support for node12
This commit is contained in:
1 parent
4e7c3077f9
commit
ee8e6ebe8d
3 files changed
+3
-3
No files matched your search
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@hydrooj/hydrojudge",
|
||||
"bin": "bin/hydrojudge.js",
|
||||
"version": "2.13.6",
|
||||
"version": "2.13.7",
|
||||
"main": "package.json",
|
||||
"author": "undefined <i@undefined.moe>",
|
||||
"repository": "https://github.com/hydro-dev/Hydro.git",
|
||||
|
||||
@@ -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}`);
|
||||
|
||||
@@ -92,7 +92,7 @@ async function postInit() {
|
||||
}
|
||||
}
|
||||
for (const name in etags) {
|
||||
if (!filenames.has(name)) await fs.rm(path.join(filePath, name));
|
||||
if (!filenames.has(name) && fs.existsSync(path.join(filePath, name))) await fs.remove(path.join(filePath, name));
|
||||
}
|
||||
fs.writeFileSync(path.join(filePath, 'etags'), JSON.stringify(version));
|
||||
fs.writeFileSync(path.join(filePath, 'lastUsage'), new Date().getTime().toString());
|
||||
|
||||
Reference in new issue
Block a user