always use the correct share type
if it is not a folder share the path already points to the correct file
Merge pull request #11691 from owncloud/fix_pub_link_creation

fix target creation for public links