Skip to content

Commit

Permalink
fix error
Browse files Browse the repository at this point in the history
  • Loading branch information
derickdiaz committed Jan 29, 2024
1 parent eef4882 commit a7b401a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/rke2/rke2_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -532,14 +532,14 @@ func cleanupDataDir(dataDir string) error {

// Ensures file is a directory, has rke2 within the name, and is not an active path
// if the function is unable to clear out the diretory, the error is ignored.
err := filepath.WalkDir(path, func(path string, info fs.DirEntry, err error) error {
err = filepath.WalkDir(path, func(path string, info fs.DirEntry, err error) error {
if !info.IsDir() || !string.Contains(path, "rke2") || slices.Contains(activePaths, path) {
continue
}
_ := os.RemoveAll(path)
})

return nil
return err
}

func getProcessExecutablePaths() ([]string, error) {
Expand Down

0 comments on commit a7b401a

Please sign in to comment.