Skip to content

Commit

Permalink
blob/gcsblob: escape backslash to get tests to pass with go 1.22
Browse files Browse the repository at this point in the history
  • Loading branch information
vangent committed Nov 22, 2023
1 parent 53ccd8d commit 9702e13
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 48 deletions.
2 changes: 1 addition & 1 deletion blob/gcsblob/gcsblob.go
Original file line number Diff line number Diff line change
Expand Up @@ -591,7 +591,7 @@ func escapeKey(key string) string {
return escape.HexEscape(key, func(r []rune, i int) bool {
switch {
// GCS doesn't handle these characters (determined via experimentation).
case r[i] == 10 || r[i] == 13:
case r[i] == 8 || r[i] == 10 || r[i] == 13:
return true
// For "../", escape the trailing slash.
case i > 1 && r[i] == '/' && r[i-1] == '.' && r[i-2] == '.':
Expand Down
Loading

0 comments on commit 9702e13

Please sign in to comment.