From 6b761cc490fd7393e75bc30dd96bf47e63bfa90a Mon Sep 17 00:00:00 2001 From: James Murdza Date: Sun, 18 Aug 2024 11:09:19 -0700 Subject: [PATCH] fix: correctly detect files and folders from R2 --- backend/server/src/fileoperations.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/server/src/fileoperations.ts b/backend/server/src/fileoperations.ts index 141363d..5e0e249 100644 --- a/backend/server/src/fileoperations.ts +++ b/backend/server/src/fileoperations.ts @@ -55,7 +55,7 @@ const processFiles = async (paths: string[], id: string) => { for (let i = 0; i < parts.length; i++) { const part = parts[i]; - const isFile = i === parts.length - 1 && part.includes("."); + const isFile = i === parts.length - 1 && part.length; const existing = current.children.find((child) => child.name === part); if (existing) {