From 1a032ce6f1d2d18fb181f9c061e4ffb3fe6aa979 Mon Sep 17 00:00:00 2001 From: Vincent Petry Date: Thu, 9 Dec 2021 14:58:31 +0100 Subject: [PATCH] Use correct icon for dir-external-root When an external storage mount is shared with circles, it triggers the share icon state to be rerendered. The picking of the mime type icon would use the regular file icon because there is no actual icon for "dir-external-root" that is shared. This fixes the logic to use the "folder-external" icon in such scenarios. Signed-off-by: Vincent Petry --- core/js/mimetype.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/js/mimetype.js b/core/js/mimetype.js index bad676d9357..7f206548177 100644 --- a/core/js/mimetype.js +++ b/core/js/mimetype.js @@ -50,7 +50,7 @@ OC.MimeType = { return 'folder-shared'; } else if (mimeType === 'dir-public' && $.inArray('folder-public', files) !== -1) { return 'folder-public'; - } else if (mimeType === 'dir-external' && $.inArray('folder-external', files) !== -1) { + } else if ((mimeType === 'dir-external' || mimeType === 'dir-external-root') && $.inArray('folder-external', files) !== -1) { return 'folder-external'; } else if ($.inArray(icon, files) !== -1) { return icon; -- 2.39.5