Ensure any provided mount point that is empty is ignored when checking for mount state
@@ -101,11 +101,13 @@ func IsMounted(mountPoint *safepath.Path) (isMounted bool, err error) {
// If error occurs, the first error is returned.
func (r *RealIsolationResult) AreMounted(mountPoints ...*safepath.Path) (isMounted bool, err error) {
for _, mountPoint := range mountPoints {
+ if mountPoint != nil {
isMounted, err = IsMounted(mountPoint)
if !isMounted || err != nil {
return
}
}
+ }
return true, nil
}
