We assume, that folders are always encoded with a / in the end in order to have a way to define a difference between folder and document. So the parent path needed to be computed differently on the server side