port already approved bugfix to master, https://github.com/owncloud/core/pull/1479