1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

Remove error return from check graph driver func

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
This commit is contained in:
Michael Crosby 2015-01-05 10:34:28 -08:00
parent 3c03827e73
commit 3011aa4e99

View file

@ -145,19 +145,16 @@ func New(root string, options []string) (driver Driver, err error) {
return nil, fmt.Errorf("No supported storage backend found")
}
func checkPriorDriver(name string, root string) error {
var priorDrivers []string
func checkPriorDriver(name, root string) {
priorDrivers := []string{}
for prior := range drivers {
if _, err := os.Stat(path.Join(root, prior)); err == nil && prior != name {
priorDrivers = append(priorDrivers, prior)
if prior != name {
if _, err := os.Stat(path.Join(root, prior)); err == nil {
priorDrivers = append(priorDrivers, prior)
}
}
}
if len(priorDrivers) > 0 {
log.Warnf("graphdriver %s selected. Warning: your graphdriver directory %s already contains data managed by other graphdrivers: %s", name, root, strings.Join(priorDrivers, ","))
}
return nil
}