fix: fixed a bug which prevented loading caplets from absolute paths

This commit is contained in:
evilsocket 2019-01-26 12:50:58 +01:00
commit dcd1fbfe27
No known key found for this signature in database
GPG key ID: 1564D7F30393A456

View file

@ -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 {