From ed8c970e165d68aef053d14e17b8880390f9948e Mon Sep 17 00:00:00 2001 From: James Murdza Date: Sun, 17 Nov 2024 16:56:07 -0500 Subject: [PATCH] fix: use relative paths when adding files to git --- backend/server/src/SecureGitClient.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/server/src/SecureGitClient.ts b/backend/server/src/SecureGitClient.ts index 34f5322..faf8f14 100644 --- a/backend/server/src/SecureGitClient.ts +++ b/backend/server/src/SecureGitClient.ts @@ -57,7 +57,7 @@ export class SecureGitClient { // Add files to the repository for (const { id, data } of fileData) { - await git.add(id) + await git.add(id.startsWith("/") ? id.slice(1) : id) } // Commit the changes