Fix stat/lstat error checking in a few places.

closes #6929. Please review.
I’ll look into this in a few minutes.

-Erik

> On Aug 8, 2014, at 8:05 AM, Tibor Vass <notifications@github.com> wrote:
> 
> In archive/changes.go:
> 
> > @@ -321,8 +321,7 @@ func ChangesSize(newDir string, changes []Change) int64 {
> >  	for _, change := range changes {
> >  		if change.Kind == ChangeModify || change.Kind == ChangeAdd {
> >  			file := filepath.Join(newDir, change.Path)
> > -			fileInfo, _ := os.Lstat(file)
> > -			if fileInfo != nil && !fileInfo.IsDir() {
> > +			if fileInfo, err := os.Lstat(file); err != nil || !fileInfo.IsDir() {
> Shouldn't this be err == nil && !fileInfo.IsDir() ? As in, if there were no errors, then fileInfo is not nil, so we can check IsDir ?
> 
> —
> Reply to this email directly or view it on GitHub <https://github.com/docker/docker/pull/6932/files#r15997496>.
>