pydio / cells

Future-proof content collaboration platform
https://pydio.com
GNU Affero General Public License v3.0
1.79k stars 174 forks source link

dao/bleve: replace Readdir(-1) with os.ReadDir #452

Closed Juneezee closed 1 year ago

Juneezee commented 1 year ago

We can simplify the following code

dir, err := os.Open(dirname)
if err != nil {
    return err
}
defer dir.Close()

dirs, err := dir.Readdir(-1)

with just os.ReadDir(dirname)

cdujeu commented 1 year ago

Hey @Juneezee thanks for submitting ! Can you kindly sign the CLA? Otherwise we cannot merge your PR !

Juneezee commented 1 year ago

Hey @Juneezee thanks for submitting ! Can you kindly sign the CLA? Otherwise we cannot merge your PR !

@cdujeu I have signed the CLA, please recheck. Thank you :smiley: