Add support for copy/add with multiple src files

Part one of solution for issue #6820

Signed-off-by: Doug Davis <dug@us.ibm.com>
The destination cannot, which I believe is what you are validating here.

On Sep 18, 2014, at 8:06 PM, Doug Davis <notifications@github.com> wrote:

> In builder/internals.go:
> 
> >  			}
> > -			parts := strings.Split(path, "/")
> > -			filename := parts[len(parts)-1]
> > -			if filename == "" {
> > -				return fmt.Errorf("cannot determine filename from url: %s", u)
> > +			remoteHash = tarSum.Sum(nil)
> > +			r.Close()
> > +
> > +			// If the destination is a directory, figure out the filename.
> > +			if strings.HasSuffix(dest, "/") {
> > +				u, err := url.Parse(orig)
> While this was in the original, I'm curious... why do you think it can't be a URL? The source of a copy/add can be a URL.
> 
> —
> Reply to this email directly or view it on GitHub.
>