فهرست منبع

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