mirror of
https://github.com/openshift/source-to-image.git
synced 2026-02-05 12:44:54 +01:00
Merge pull request #1111 from Juneezee/refactor/simplify-fs-copycontents
refactor(fs): simplify CopyContents
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user