Merge pull request #9640 from fuweid/fix-9638

mount: UnmountRecursive return nil if path doesn't exist
This commit is contained in:
Akihiro Suda 2024-01-15 23:11:13 +00:00 committed by GitHub
commit f1e6cc3784
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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
}