Merge pull request #1377 from mrunalp/sym_context_master
Add context to net ns symlink removal errors
This commit is contained in:
commit
a5c3e05f9f
1 changed files with 6 additions and 2 deletions
|
@ -59,10 +59,14 @@ func (ns *NetNs) symlinkCreate(name string) error {
|
|||
|
||||
func (ns *NetNs) symlinkRemove() error {
|
||||
if err := ns.symlink.Close(); err != nil {
|
||||
return err
|
||||
return fmt.Errorf("failed to close net ns symlink: %v", err)
|
||||
}
|
||||
|
||||
return os.RemoveAll(ns.symlink.Name())
|
||||
if err := os.RemoveAll(ns.symlink.Name()); err != nil {
|
||||
return fmt.Errorf("failed to remove net ns symlink: %v", err)
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func isSymbolicLink(path string) (bool, error) {
|
||||
|
|
Loading…
Reference in a new issue