Merge pull request #9640 from fuweid/fix-9638
mount: UnmountRecursive return nil if path doesn't exist
This commit is contained in:
commit
f1e6cc3784
@ -19,6 +19,7 @@
|
|||||||
package mount
|
package mount
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"os"
|
||||||
"sort"
|
"sort"
|
||||||
|
|
||||||
"github.com/moby/sys/mountinfo"
|
"github.com/moby/sys/mountinfo"
|
||||||
@ -33,6 +34,9 @@ func UnmountRecursive(target string, flags int) error {
|
|||||||
|
|
||||||
target, err := CanonicalizePath(target)
|
target, err := CanonicalizePath(target)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
if os.IsNotExist(err) {
|
||||||
|
err = nil
|
||||||
|
}
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user