@owaspjocur The first code snippet seems like a perfectly fine way of making an absolute path.

The second code snippet is completely wrong.