ソースを参照

cmd/syncthing: Correct strings.HasPrefix args order (#5498)

Iskander (Alex) Sharipov 7 年 前
コミット
ca47b4c218
1 ファイル変更2 行追加2 行削除
  1. 2 2
      cmd/syncthing/monitor.go

+ 2 - 2
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)