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:
parent
3c03827e73
commit
3011aa4e99
1 changed files with 6 additions and 9 deletions
|
@ -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 {
|
||||
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
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue