Skip to content

Commit

Permalink
normalize path separators for s3 to "/"
Browse files Browse the repository at this point in the history
  • Loading branch information
arilotter committed Aug 10, 2022
1 parent 434f7b6 commit fc4f99f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion s3.go
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,11 @@ func (s *S3Upload) sourceFiles() ([]*FileData, error) {
}

destPath := filepath.Join("/", hashPrefix, s.Config.S3.Prefix, cpath)

// Normalize path separators on the S3 side to a forward slashm, for OSes like Windows.
if os.PathSeparator != '/' {
destPath = strings.Replace(destPath, string(os.PathSeparator), "/", -1)
}

// Add to the list of files to upload
files = append(
files,
Expand Down

0 comments on commit fc4f99f

Please sign in to comment.