存档新建&删除

This commit is contained in:
目棃
2024-09-21 10:52:24 +08:00
parent 900a125d7f
commit 6d06bb7a21
3 changed files with 34 additions and 9 deletions

View File

@@ -310,6 +310,7 @@ async function restoreUiaf(dir: string): Promise<boolean> {
// 正则匹配 UIAF_xx.json
for (const file of files) {
try {
// todo 完善正则判断
const reg = new RegExp(/(.*)UIAF_d{9}.json/);
if (!file.name.match(reg)) return false;
const uid: number = Number(file.name.match(reg)![0]);