diff --git a/registry/handlers/app.go b/registry/handlers/app.go index 670a2794..24442d7e 100644 --- a/registry/handlers/app.go +++ b/registry/handlers/app.go @@ -345,7 +345,7 @@ func (app *App) RegisterHealthChecks(healthRegistries ...*health.Registry) { } storageDriverCheck := func() error { - _, err := app.driver.List(app, "/") // "/" should always exist + _, err := app.driver.Stat(app, "/") // "/" should always exist return err // any error will be treated as failure } diff --git a/registry/storage/driver/base/base.go b/registry/storage/driver/base/base.go index 064bda60..e14f7edb 100644 --- a/registry/storage/driver/base/base.go +++ b/registry/storage/driver/base/base.go @@ -137,7 +137,7 @@ func (base *Base) Stat(ctx context.Context, path string) (storagedriver.FileInfo ctx, done := context.WithTrace(ctx) defer done("%s.Stat(%q)", base.Name(), path) - if !storagedriver.PathRegexp.MatchString(path) { + if !storagedriver.PathRegexp.MatchString(path) && path != "/" { return nil, storagedriver.InvalidPathError{Path: path, DriverName: base.StorageDriver.Name()} }