From 8901bb964c6fdbdc83708bd362d0c13d9ef8aa1a Mon Sep 17 00:00:00 2001 From: Chen-I Lim Date: Tue, 30 Mar 2021 10:06:11 -0700 Subject: [PATCH] filepath.Join --- server/app/files.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/app/files.go b/server/app/files.go index 866bbe7ba..6ad756158 100644 --- a/server/app/files.go +++ b/server/app/files.go @@ -18,7 +18,7 @@ func (a *App) SaveFile(reader io.Reader, workspaceID, rootID, filename string) ( } createdFilename := fmt.Sprintf(`%s%s`, utils.CreateGUID(), fileExtension) - filePath := fmt.Sprintf(`%s/%s/%s`, workspaceID, rootID, createdFilename) + filePath := filepath.Join(workspaceID, rootID, createdFilename) _, appErr := a.filesBackend.WriteFile(reader, filePath) if appErr != nil {