From ca47b4c218eb2e6b8aff49b58dca4dd4b65a7e10 Mon Sep 17 00:00:00 2001 From: "Iskander (Alex) Sharipov" Date: Sat, 2 Feb 2019 14:18:19 +0300 Subject: [PATCH] cmd/syncthing: Correct strings.HasPrefix args order (#5498) --- cmd/syncthing/monitor.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/syncthing/monitor.go b/cmd/syncthing/monitor.go index d57811a1..0909dd2c 100644 --- a/cmd/syncthing/monitor.go +++ b/cmd/syncthing/monitor.go @@ -418,10 +418,10 @@ func (f *autoclosedFile) closerLoop() { func childEnv() []string { var env []string for _, str := range os.Environ() { - if strings.HasPrefix("STNORESTART=", str) { + if strings.HasPrefix(str, "STNORESTART=") { continue } - if strings.HasPrefix("STMONITORED=", str) { + if strings.HasPrefix(str, "STMONITORED=") { continue } env = append(env, str)