[sharing] fix performance issues

Fix performance issue when the user has folders with many files and want to share a new one.

https://github.com/owncloud/core/issues/10588
As far I can see the false will never be returned here - if so, then why not remove it?