From 2d8cd51379f293fe2047c1347b52f8dc7ac3f78d Mon Sep 17 00:00:00 2001 From: Simon Ruderich Date: Sun, 9 May 2021 12:28:33 +0200 Subject: [PATCH] sync: remove duplicate code in triggerPaths() --- cmd/safcm-remote/sync/triggers.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/cmd/safcm-remote/sync/triggers.go b/cmd/safcm-remote/sync/triggers.go index 34aae7d..d201835 100644 --- a/cmd/safcm-remote/sync/triggers.go +++ b/cmd/safcm-remote/sync/triggers.go @@ -51,9 +51,7 @@ func (s *Sync) queueTriggers(file *safcm.File) { // "/" or ".", then the parents and finally path itself). func triggerPaths(path string) []string { sep := string(filepath.Separator) - if path == sep { - return []string{path} - } else if path == "." { + if path == sep || path == "." { return []string{path} } parts := strings.Split(path, sep) -- 2.43.2