Struggling with the #Java Path API in
safePrefix(Path prefix, Path tail)
to resolve tail onto prefix or return null if the result is not a file **below** prefix. This shall prevent path traversal attacks. The code is ugly.
The tricky shit is in things like safePrefix("..", "..") where Path.normalize() does not what we might like it to do.
I would be happy about any code review I can get. (So boosts would be nice.)


