From dcd1fbfe27fe0fb321202c9fa387e1e176b5a1f0 Mon Sep 17 00:00:00 2001 From: evilsocket Date: Sat, 26 Jan 2019 12:50:58 +0100 Subject: [PATCH] fix: fixed a bug which prevented loading caplets from absolute paths --- caplets/manager.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/caplets/manager.go b/caplets/manager.go index 66a4f920..88620c61 100644 --- a/caplets/manager.go +++ b/caplets/manager.go @@ -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 {