4
0
Эх сурвалжийг харах

bugfix: #337 - Entity overwriting (#382)

James Read 1 жил өмнө
parent
commit
1fe0e49adb

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