mirror of
https://github.com/danieldemus/openhab-core.git
synced 2025-01-26 20:21:33 +01:00
[automation] Updated rule dsl filename to rule uid mapping (#2003)
use full filename without extension as uid for rules provided by DSL files fix bug where rule filenames with common prefix and "." resulted in same uid Signed-off-by: Leon Kiefer <leon.k97@gmx.de>
This commit is contained in:
parent
ce95ed191e
commit
49a17a5f5e
@ -129,7 +129,7 @@ public class DSLRuleProvider
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void modelChanged(String modelFileName, EventType type) {
|
public void modelChanged(String modelFileName, EventType type) {
|
||||||
String ruleModelName = modelFileName.substring(0, modelFileName.indexOf("."));
|
String ruleModelName = modelFileName.substring(0, modelFileName.lastIndexOf("."));
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case ADDED:
|
case ADDED:
|
||||||
EObject model = modelRepository.getModel(modelFileName);
|
EObject model = modelRepository.getModel(modelFileName);
|
||||||
|
Loading…
Reference in New Issue
Block a user