mount: UnmountRecursive return nil if path doesn't exist

Signed-off-by: Wei Fu <fuweid89@gmail.com>
This commit is contained in:
Wei Fu 2024-01-15 21:48:24 +08:00
parent 4dcfd5bf6e
commit d4396c96bf

View File

@ -19,6 +19,7 @@
package mount
import (
"os"
"sort"
"github.com/moby/sys/mountinfo"
@ -33,6 +34,9 @@ func UnmountRecursive(target string, flags int) error {
target, err := CanonicalizePath(target)
if err != nil {
if os.IsNotExist(err) {
err = nil
}
return err
}