summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorVincent Petry <vincent@nextcloud.com>2021-12-09 14:58:31 +0100
committerbackportbot[bot] <backportbot[bot]@users.noreply.github.com>2021-12-10 09:36:03 +0000
commitb12e1e3ca2798a447045ef0681e983fd5d2f606e (patch)
tree6f0d432882e3b9fca5f445af14a3b5487fdf81cb /core
parent4df4e6ea4db74e0855aca022cb0ba1ab244dc753 (diff)
downloadnextcloud-server-b12e1e3ca2798a447045ef0681e983fd5d2f606e.tar.gz
nextcloud-server-b12e1e3ca2798a447045ef0681e983fd5d2f606e.zip
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 <vincent@nextcloud.com>
Diffstat (limited to 'core')
-rw-r--r--core/js/mimetype.js2
1 files changed, 1 insertions, 1 deletions
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;