We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 851e100 + 620956c commit 89c46a9Copy full SHA for 89c46a9
libcontainer/intelrdt/intelrdt.go
@@ -472,7 +472,7 @@ func (m *Manager) Apply(pid int) (err error) {
472
}
473
474
475
- if err := os.MkdirAll(path, 0o755); err != nil {
+ if err := os.Mkdir(path, 0o755); err != nil && !os.IsExist(err) {
476
return newLastCmdError(err)
477
478
@@ -492,7 +492,7 @@ func (m *Manager) Destroy() error {
492
if m.config.IntelRdt != nil && m.config.IntelRdt.ClosID == "" {
493
m.mu.Lock()
494
defer m.mu.Unlock()
495
- if err := os.RemoveAll(m.GetPath()); err != nil {
+ if err := os.Remove(m.GetPath()); err != nil && !os.IsNotExist(err) {
496
return err
497
498
m.path = ""
0 commit comments