When sub directories contained the same string as the layer name, the split() would cause the path manipulation logic to fail. This fix makes the the string split on layers/${layer.name} which ensures only the highest level layer folder is split.
To reproduce this issue, imagine the layer is Eyes and the subdir is Eyes_Green. The folder is layers/Eyes/Eyes_Green/...
The split() would split on both Eyes and Eyes_Green causing the folder reading logic to fail.
When sub directories contained the same string as the layer name, the
split()
would cause the path manipulation logic to fail. This fix makes the the string split onlayers/${layer.name}
which ensures only the highest level layer folder is split.To reproduce this issue, imagine the layer is
Eyes
and the subdir isEyes_Green
. The folder islayers/Eyes/Eyes_Green/...
The
split()
would split on bothEyes
andEyes_Green
causing the folder reading logic to fail.