File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ import (
1010
1111 "github.com/sirupsen/logrus"
1212 "go.podman.io/storage/internal/staging_lockfile"
13+ "go.podman.io/storage/pkg/system"
1314)
1415
1516/*
@@ -148,7 +149,7 @@ func RecoverStaleDirs(rootDir string) error {
148149 continue
149150 }
150151
151- if rmErr := os . RemoveAll (tempDirPath ); rmErr != nil {
152+ if rmErr := system . EnsureRemoveAll (tempDirPath ); rmErr != nil {
152153 recoveryErrors = append (recoveryErrors , fmt .Errorf ("error removing stale temp dir: %w" , rmErr ))
153154 }
154155 if unlockErr := instanceLock .UnlockAndDelete (); unlockErr != nil {
@@ -218,7 +219,7 @@ func (td *TempDir) Cleanup() error {
218219 return nil
219220 }
220221
221- if err := os . RemoveAll (td .tempDirPath ); err != nil {
222+ if err := system . EnsureRemoveAll (td .tempDirPath ); err != nil {
222223 return fmt .Errorf ("removing temp dir failed: %w" , err )
223224 }
224225
You can’t perform that action at this time.
0 commit comments