mirror of
https://github.com/projectdiscovery/nuclei.git
synced 2025-12-18 18:55:24 +00:00
fix(disk): handle glob errors consistently
Signed-off-by: Dwi Siswanto <git@dw1.io>
This commit is contained in:
parent
d6714644ac
commit
0e793551cf
@ -141,14 +141,12 @@ func (c *DiskCatalog) findGlobPathMatches(absPath string, processed map[string]s
|
|||||||
|
|
||||||
if c.templatesFS != nil {
|
if c.templatesFS != nil {
|
||||||
matches, err = fs.Glob(c.templatesFS, relPath)
|
matches, err = fs.Glob(c.templatesFS, relPath)
|
||||||
if err != nil {
|
|
||||||
return matches, err
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
matches, err = filepath.Glob(absPath)
|
matches, err = filepath.Glob(absPath)
|
||||||
if err != nil {
|
|
||||||
return matches, err
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
results := make([]string, 0, len(matches))
|
results := make([]string, 0, len(matches))
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user