vendor/github.com/spf13/afero/httpFs.go
changeset 260 445e01aede7e
parent 256 6d9efbef00a9
equal deleted inserted replaced
259:db4911b0c721 260:445e01aede7e
    27 	basePath string
    27 	basePath string
    28 	fs       HttpFs
    28 	fs       HttpFs
    29 }
    29 }
    30 
    30 
    31 func (d httpDir) Open(name string) (http.File, error) {
    31 func (d httpDir) Open(name string) (http.File, error) {
    32 	if filepath.Separator != '/' && strings.IndexRune(name, filepath.Separator) >= 0 ||
    32 	if filepath.Separator != '/' && strings.ContainsRune(name, filepath.Separator) ||
    33 		strings.Contains(name, "\x00") {
    33 		strings.Contains(name, "\x00") {
    34 		return nil, errors.New("http: invalid character in file path")
    34 		return nil, errors.New("http: invalid character in file path")
    35 	}
    35 	}
    36 	dir := string(d.basePath)
    36 	dir := string(d.basePath)
    37 	if dir == "" {
    37 	if dir == "" {