Преглед изворни кода

bugfix: #337 - Entity overwriting (#382)

James Read пре 1 година
родитељ
комит
1fe0e49adb
1 измењених фајлова са 2 додато и 1 уклоњено
  1. 2 1
      internal/entityfiles/entityfiles.go

+ 2 - 1
internal/entityfiles/entityfiles.go

@@ -32,7 +32,8 @@ func SetupEntityFileWatchers(cfg *config.Config) {
 		configDir = configDirVar
 	}
 
-	for _, ef := range cfg.Entities {
+	for entityIndex, _ := range cfg.Entities { // #337 - iterate by key, not by value
+		ef := cfg.Entities[entityIndex]
 		p := ef.File
 
 		if !filepath.IsAbs(p) {