diff --git a/lib/private/share/mailnotifications.php b/lib/private/share/mailnotifications.php index 62ab210b99eef7b65568ee270124961732da2104..1f4645eed9f17479a2f4e51e27a64df91802ae6b 100644 --- a/lib/private/share/mailnotifications.php +++ b/lib/private/share/mailnotifications.php @@ -100,13 +100,19 @@ class MailNotifications { } // Link to folder, or root folder if a file + if ($itemType === 'folder') { - $foldername = $filename; + $args = array( + 'dir' => $filename, + ); } else { - $foldername = "/"; + $args = array( + 'dir' => '/', + 'scrollto' => $filename, + ); } - $link = \OCP\Util::linkToAbsolute('files', 'index.php', array("dir" => $foldername)); + $link = \OCP\Util::linkToAbsolute('files', 'index.php', $args); list($htmlMail, $alttextMail) = $this->createMailBody($filename, $link, $expiration);