backport important changes of makePathfield for 0.9.31

Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
Merge remote-tracking branch 'origin/0.9.31'