Revert "Merge pull request #6210 from owncloud/fix-5865"

This reverts commit f12363d90b31e03a9f2e95911dda54af728a2df6, reversing
changes made to eba35d28cd974507f9e81e15430d3d33dbbd9973.