fix performance issues
try to get path from filesystem
Merge pull request #11380 from owncloud/fix_performance_issue_sharing

[sharing] fix performance issues