mirror of
https://github.com/bettercap/bettercap
synced 2025-08-14 10:46:57 -07:00
fix: fixed a bug which prevented loading caplets from absolute paths
This commit is contained in:
parent
bbf178e3db
commit
dcd1fbfe27
1 changed files with 6 additions and 2 deletions
|
@ -56,8 +56,12 @@ func Load(name string) (error, *Caplet) {
|
|||
name += Suffix
|
||||
}
|
||||
|
||||
for _, path := range LoadPaths {
|
||||
names = append(names, filepath.Join(path, name))
|
||||
if name[0] != '/' {
|
||||
for _, path := range LoadPaths {
|
||||
names = append(names, filepath.Join(path, name))
|
||||
}
|
||||
} else {
|
||||
names = append(names, name)
|
||||
}
|
||||
|
||||
for _, filename := range names {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue