Returning an error if the list fails

This commit is contained in:
Diptanu Choudhury 2016-01-14 11:47:05 -08:00
parent 29d264ff7c
commit e77be22c43
1 changed files with 1 additions and 1 deletions

View File

@ -227,7 +227,7 @@ func (d *AllocDir) List(path string) ([]*AllocFileInfo, error) {
p := filepath.Join(d.AllocDir, path)
finfos, err := ioutil.ReadDir(p)
if err != nil {
return []*AllocFileInfo{}, nil
return []*AllocFileInfo{}, err
}
files := make([]*AllocFileInfo, len(finfos))
for idx, info := range finfos {