From: Simon Ruderich Date: Sun, 9 May 2021 10:28:33 +0000 (+0200) Subject: sync: remove duplicate code in triggerPaths() X-Git-Url: https://ruderich.org/simon/gitweb/?p=safcm%2Fsafcm.git;a=commitdiff_plain;h=2d8cd51379f293fe2047c1347b52f8dc7ac3f78d sync: remove duplicate code in triggerPaths() --- 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)