From c89aeed57612632e418b4511908880dfd8140a30 Mon Sep 17 00:00:00 2001 From: comp500 Date: Sun, 19 Sep 2021 14:31:19 +0100 Subject: [PATCH] Remove unnecessary filepath.Rel (Ignore calls Abs anyway) --- core/index.go | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/core/index.go b/core/index.go index 94dab60..1b6bafa 100644 --- a/core/index.go +++ b/core/index.go @@ -207,11 +207,8 @@ func (in *Index) Refresh() error { return nil } - rel, err := filepath.Rel(packRoot, path) - if err == nil { - if ignore.Ignore(filepath.ToSlash(rel)) { - return nil - } + if ignore.Ignore(absPath) { + return nil } }