Skip to content

Commit

Permalink
Fix the driver name empty case
Browse files Browse the repository at this point in the history
As drivername maybe "" in hostconfig, so we should not
directly print dirvername with var drivername,
instead, we use the real driver name property to print it.

Fixes: moby#20900
Signed-off-by: Kai Qiang Wu(Kennan) <[email protected]>
  • Loading branch information
Kai Qiang Wu(Kennan) committed Mar 3, 2016
1 parent 361a63e commit 6c78eda
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion volume/store/store.go
Original file line number Diff line number Diff line change
Expand Up @@ -194,12 +194,14 @@ func (s *VolumeStore) create(name, driverName string, opts map[string]string) (v
}
}

logrus.Debugf("Registering new volume reference: driver %q, name %q", driverName, name)
vd, err := volumedrivers.GetDriver(driverName)

if err != nil {
return nil, &OpErr{Op: "create", Name: name, Err: err}
}

logrus.Debugf("Registering new volume reference: driver %q, name %q", vd.Name(), name)

if v, _ := vd.Get(name); v != nil {
return v, nil
}
Expand Down

0 comments on commit 6c78eda

Please sign in to comment.