mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-17 09:36:08 +08:00
judge: 优化无测试数据时的提示
This commit is contained in:
1 parent
a6297bfe9b
commit
b15cadf5fb
2 files changed
+2
-2
No files matched your search
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@hydrooj/hydrojudge",
|
||||
"bin": "bin/hydrojudge.js",
|
||||
"version": "2.4.13",
|
||||
"version": "2.4.14",
|
||||
"os": [
|
||||
"linux"
|
||||
],
|
||||
|
||||
@@ -75,7 +75,7 @@ async function postInit() {
|
||||
async function cacheOpen(domainId: string, pid: string, files: any[]) {
|
||||
const filePath = path.join(getConfig('cache_dir'), domainId, pid);
|
||||
await fs.ensureDir(filePath);
|
||||
if (!files.length) throw new SystemError('Problem data not found.');
|
||||
if (!files?.length) throw new SystemError('Problem data not found.');
|
||||
let etags: Record<string, string> = {};
|
||||
try {
|
||||
etags = JSON.parse(fs.readFileSync(path.join(filePath, 'etags')).toString());
|
||||
|
||||
Reference in new issue
Block a user