Browse Source

fix filename not set error

pull/2/head
Chris Lu 11 years ago
parent
commit
47aea42d66
  1. 2
      go/weed/volume.go

2
go/weed/volume.go

@ -165,7 +165,7 @@ func GetOrHeadHandler(w http.ResponseWriter, r *http.Request, isGetMethod bool)
} }
} }
if n.NameSize > 0 && filename == "" { if n.NameSize > 0 && filename == "" {
filename := string(n.Name)
filename = string(n.Name)
dotIndex := strings.LastIndex(filename, ".") dotIndex := strings.LastIndex(filename, ".")
if dotIndex > 0 { if dotIndex > 0 {
ext = filename[dotIndex:] ext = filename[dotIndex:]

Loading…
Cancel
Save