Skip to content

Commit

Permalink
Merge pull request #1111 from Juneezee/refactor/simplify-fs-copycontents
Browse files Browse the repository at this point in the history
refactor(fs): simplify CopyContents
  • Loading branch information
openshift-merge-robot authored Mar 14, 2023
2 parents c6c9fed + 97a4019 commit 305ff89
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions pkg/util/fs/fs.go
Original file line number Diff line number Diff line change
Expand Up @@ -287,12 +287,7 @@ func (h *fs) CopyContents(src, dest string, isIgnored func(path string) bool) (e
if err = os.MkdirAll(dest, sourceinfo.Mode()); err != nil {
return err
}
directory, err := os.Open(src)
if err != nil {
return err
}
defer directory.Close()
objects, err := directory.Readdir(-1)
objects, err := os.ReadDir(src)
if err != nil {
return err
}
Expand Down

0 comments on commit 305ff89

Please sign in to comment.