fix preview for reshared file

fixes https://github.com/owncloud/core/issues/5982

please review @DeepDiver1975 @schiesbn @karlitschek