diff --git a/apps/files/lib/Collaboration/Resources/ResourceProvider.php b/apps/files/lib/Collaboration/Resources/ResourceProvider.php
index 155dcbd7b1466a55b08e7392c74b4fb89896aa28..1a6089b4856c9dcfb2a428d07233ebe2fac063f0 100644
--- a/apps/files/lib/Collaboration/Resources/ResourceProvider.php
+++ b/apps/files/lib/Collaboration/Resources/ResourceProvider.php
@@ -48,6 +48,13 @@ class ResourceProvider implements IProvider {
 		$this->urlGenerator = $urlGenerator;
 	}
 
+	private function getNode(IResource $resource): ?Node {
+		if (isset($this->nodes[(int) $resource->getId()])) {
+			return $this->nodes[(int) $resource->getId()];
+		}
+		return null;
+	}
+
 	/**
 	 * Get the display name of a resource
 	 *
@@ -94,7 +101,11 @@ class ResourceProvider implements IProvider {
 	 * @since 15.0.0
 	 */
 	public function getIconClass(IResource $resource): string {
-		return 'icon-folder';
+		$node = $this->getNode($resource);
+		if ($node && $node->getMimetype() === 'httpd/unix-directory') {
+			return 'icon-files-dark';
+		}
+		return 'icon-filetype-file';
 	}
 
 	/**
diff --git a/apps/files_sharing/src/files_sharing.js b/apps/files_sharing/src/files_sharing.js
index 4e90afaf9430b19831b05fe26b0dfd897ed0b787..54bf71d8a19ea14ea2fb0b5b77f1b4bd678161e2 100644
--- a/apps/files_sharing/src/files_sharing.js
+++ b/apps/files_sharing/src/files_sharing.js
@@ -22,7 +22,8 @@ window.OCP.Collaboration.registerType('files', {
 		});
 	},
 	/** used in "Link to a {typeString}" */
-	typeString: t('files_sharing', 'file')
+	typeString: t('files_sharing', 'file'),
+	typeIconClass: 'icon-files-dark'
 });
 
 window.OCA.Sharing = OCA.Sharing;
diff --git a/core/css/icons.scss b/core/css/icons.scss
index 9a9500170918ce26a4a82c7c36904e33a00d0782..d1d3d91094f8d511cc137d7d441997db8eafeae2 100644
--- a/core/css/icons.scss
+++ b/core/css/icons.scss
@@ -384,6 +384,10 @@ img, object, video, button, textarea, input, select, div[contenteditable='true']
 	@include icon-color('text', 'filetypes', $color-black, 1, true);
 }
 
+.icon-filetype-file {
+	@include icon-color('file', 'filetypes', $color-black, 1, true);
+}
+
 @include icon-black-white('folder', 'filetypes', 1, true);
 .icon-filetype-folder {
 	@include icon-color('folder', 'filetypes', $color-black, 1, true);
diff --git a/core/src/OCP/collaboration.js b/core/src/OCP/collaboration.js
index 54b580406ed2e0fb139143b6dd51c226591e71c1..96a20bffc9c2c1b90ffae5977554986b5c3550be 100644
--- a/core/src/OCP/collaboration.js
+++ b/core/src/OCP/collaboration.js
@@ -49,7 +49,7 @@ export default {
 		return Object.keys(types);
 	},
 	getIcon(type) {
-		return types[type].icon || '';
+		return types[type].typeIconClass || '';
 	},
 	getLabel(type) {
 		return t('files_sharing', 'Link to a {label}', { label: types[type].typeString || type }, 1)