Sfoglia il codice sorgente

bugfix: #337 - Entity overwriting (#382)

James Read 1 anno fa
parent
commit
1fe0e49adb
1 ha cambiato i file con 2 aggiunte e 1 eliminazioni
  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) {