judge: fix?

This commit is contained in:
undefined committed 2021-06-12 16:26:53 +08:00
1 parent 85def7213b
commit 4fd580e4ed
3 files changed
+5 -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)) await fs.rm(path.join(filePath, name));
if (!allFiles.has(name) && fs.existsSync(path.join(filePath, name))) await fs.rm(path.join(filePath, name));
}
if (filenames.length) {
log.info(`Getting problem data: ${this.config.host}/${domainId}/${pid}`);