hirochachacha / go-smb2

SMB2/3 client library written in Go.
BSD 2-Clause "Simplified" License
350 stars 94 forks source link

share.Glob does not return error #87

Open palevi67 opened 10 months ago

palevi67 commented 10 months ago

... in case of missing permissions or other I/O errors. As per filepath.go, this seems to be intentional:

func (fs *Share) glob(dir, pattern string, matches []string) (m []string, e error) {
    m = matches
    fi, err := fs.Stat(dir)
    if err != nil {
        return // ignore I/O error
    }

but, why? This difficults the detection of SMB configuration problems.

Best regards.