diff --git a/mount/mount_unix.go b/mount/mount_unix.go index 9645a46e3..46dfd1c34 100644 --- a/mount/mount_unix.go +++ b/mount/mount_unix.go @@ -27,6 +27,9 @@ import ( // UnmountRecursive unmounts the target and all mounts underneath, starting // with the deepest mount first. func UnmountRecursive(target string, flags int) error { + if target == "" { + return nil + } mounts, err := mountinfo.GetMounts(mountinfo.PrefixFilter(target)) if err != nil { return err