Fix unintent subfolder creation
This commit is contained in:
parent
2de3fdb81d
commit
87306f1dce
1 changed files with 3 additions and 2 deletions
|
|
@ -166,13 +166,14 @@ export class DocumentController extends Controller {
|
|||
) {
|
||||
const path = ["ระบบเงินเดือน", "เอกสารอ้างอิงผังเงินเดือน", id];
|
||||
|
||||
if (!(await createFolder(path, id, true))) {
|
||||
if (!(await createFolder(path.slice(0, -1), id, true))) {
|
||||
throw new Error("เกิดข้อผิดพลาดกับระบบจัดการไฟล์ ไม่สามารถสร้างแฟ้มได้");
|
||||
}
|
||||
|
||||
const list = await listFile(path);
|
||||
|
||||
if (!list || !Array.isArray(list)) {
|
||||
throw new Error("เกิดข้อผิดพลาดกับระบบจัดการไฟล์ ไม่สามารถสร้างแฟ้มได้");
|
||||
throw new Error("เกิดข้อผิดพลาดกับระบบจัดการไฟล์ เข้าถึงรายการไฟล์ได้");
|
||||
}
|
||||
|
||||
let used: string[] = [];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue