Remove unused and overflowing function

Function is unused anyways and buggy => Not worth to invest time into it to have it working properly => Drop it.

Resolves https://github.com/owncloud/core/issues/10991 failure 4