fix: use path instead of filepath for S3 object paths on Windows (#7739)

fix: use path instead of filepath for S3 object paths on Windows (#7733)
This commit is contained in:
Chris Lu
2025-12-14 11:18:23 -08:00
committed by GitHub
parent eb860752e6
commit a77674ead3
5 changed files with 202 additions and 9 deletions

View File

@@ -11,7 +11,7 @@ import (
"fmt"
"math"
"net/url"
"path/filepath"
"path"
"slices"
"sort"
"strconv"
@@ -552,8 +552,8 @@ func (s3a *S3ApiServer) completeMultipartUpload(r *http.Request, input *s3.Compl
}
func (s3a *S3ApiServer) getEntryNameAndDir(input *s3.CompleteMultipartUploadInput) (string, string) {
entryName := filepath.Base(*input.Key)
dirName := filepath.ToSlash(filepath.Dir(*input.Key))
entryName := path.Base(*input.Key)
dirName := path.Dir(*input.Key)
if dirName == "." {
dirName = ""
}