From 89542db2d0b15502f31575216e6568588ad71552 Mon Sep 17 00:00:00 2001 From: Henco Appel Date: Tue, 11 Jul 2023 17:05:14 +0100 Subject: [PATCH] Fix S3 API multipart upload on Windows (#4666) The file paths were being having '/' changed to '\' by filepath.Dir() resulting in a file being created with '\' separators, but when trying to read the files, the same wasn't happening. Co-authored-by: Hendrik Appel --- weed/s3api/filer_multipart.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/weed/s3api/filer_multipart.go b/weed/s3api/filer_multipart.go index 414ba4bb2..3cf0971f6 100644 --- a/weed/s3api/filer_multipart.go +++ b/weed/s3api/filer_multipart.go @@ -122,7 +122,7 @@ func (s3a *S3ApiServer) completeMultipartUpload(input *s3.CompleteMultipartUploa } entryName := filepath.Base(*input.Key) - dirName := filepath.Dir(*input.Key) + dirName := filepath.ToSlash(filepath.Dir(*input.Key)) if dirName == "." { dirName = "" }