From 929558372766b9ea95ed79d324bb3dfca385104e Mon Sep 17 00:00:00 2001 From: Louis Lam Date: Sun, 12 Nov 2023 23:09:31 +0800 Subject: [PATCH] Fix #9 --- backend/stack.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/backend/stack.ts b/backend/stack.ts index 5a15fc1..f582c49 100644 --- a/backend/stack.ts +++ b/backend/stack.ts @@ -177,6 +177,11 @@ export class Stack { for (let filename of filenameList) { try { + // Check if it is a directory + let stat = fs.statSync(path.join(stacksDir, filename)); + if (!stat.isDirectory()) { + continue; + } let stack = this.getStack(server, filename); stack._status = CREATED_FILE; stackList.set(filename, stack);