diff --git a/core/ajax/share.php b/core/ajax/share.php
index 9201b48cb954af5849b0b19334a376b37486a444..37ddf8ae6cf1e73329b43bd0391dc369385b9cd4 100644
--- a/core/ajax/share.php
+++ b/core/ajax/share.php
@@ -95,12 +95,12 @@ if (isset($_POST['action']) && isset($_POST['itemType']) && isset($_POST['itemSo
 
 			// setup the email
 			$subject = (string)$l->t('User %s shared a file with you', $displayName);
-			if ($type === 'dir')
+			if ($type === 'folder')
 				$subject = (string)$l->t('User %s shared a folder with you', $displayName);
 
 			$text = (string)$l->t('User %s shared the file "%s" with you. It is available for download here: %s',
 				array($displayName, $file, $link));
-			if ($type === 'dir')
+			if ($type === 'folder')
 				$text = (string)$l->t('User %s shared the folder "%s" with you. It is available for download here: %s',
 					array($displayName, $file, $link));