From 68486042b11af395cc4adf3c2337fa1f59d5e289 Mon Sep 17 00:00:00 2001 From: Roshan-Mehta Date: Fri, 19 Jan 2024 16:58:58 +0530 Subject: [PATCH] Fix sync in windows --- zboxcore/sdk/sync.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/zboxcore/sdk/sync.go b/zboxcore/sdk/sync.go index 6f38d47e6..494283a60 100644 --- a/zboxcore/sdk/sync.go +++ b/zboxcore/sdk/sync.go @@ -135,7 +135,9 @@ func addLocalFileList(root string, fMap map[string]FileInfo, dirList *[]string, if err != nil { l.Logger.Error("getting relative path failed", err) } - lPath = "/" + lPath + // Allocation paths are like unix, so we modify all the backslashes + // to forward slashes. File path in windows contain backslashes. + lPath = "/" + strings.ReplaceAll(lPath, "\\", "/") // Exclude if _, ok := exclMap[lPath]; ok { if info.IsDir() {