mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
fps-import: ignore file not exist
This commit is contained in:
1 parent
016c7ea8b7
commit
f80c3426fc
2 files changed
+2
-1
No files matched your search
@@ -66,6 +66,7 @@ class FpsProblemImportHandler extends Handler {
|
|||||||
ProblemModel.addTestdata(domainId, pid, 'config.yaml', Buffer.from(`time: ${config.time}\nmemory: ${config.memory}`)),
|
ProblemModel.addTestdata(domainId, pid, 'config.yaml', Buffer.from(`time: ${config.time}\nmemory: ${config.memory}`)),
|
||||||
];
|
];
|
||||||
const addTestdata = (node: any, id: string, ext: string) => {
|
const addTestdata = (node: any, id: string, ext: string) => {
|
||||||
|
if (!node && typeof node !== 'string') return; // Ignore file not exist
|
||||||
let c = node;
|
let c = node;
|
||||||
if (node.$?.name) {
|
if (node.$?.name) {
|
||||||
id = node.$.name;
|
id = node.$.name;
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@hydrooj/fps-importer",
|
"name": "@hydrooj/fps-importer",
|
||||||
"version": "1.5.0",
|
"version": "1.5.1",
|
||||||
"description": "Import FPS problems",
|
"description": "Import FPS problems",
|
||||||
"main": "index.ts",
|
"main": "index.ts",
|
||||||
"repository": "https://github.com/hydro-dev/Hydro.git",
|
"repository": "https://github.com/hydro-dev/Hydro.git",
|
||||||
|
|||||||
Reference in new issue
Block a user