diff --git a/components/system/Files/FileEntry/functions.ts b/components/system/Files/FileEntry/functions.ts index 92014ce838..3f5a012402 100644 --- a/components/system/Files/FileEntry/functions.ts +++ b/components/system/Files/FileEntry/functions.ts @@ -166,10 +166,7 @@ export const getShortcutInfo = ( return { comment, - icon: - !icon && pid && pid !== "FileExplorer" - ? processDirectory[pid]?.icon - : icon, + icon, pid, type, url, @@ -486,24 +483,18 @@ export const getInfoWithExtension = ( } else { callback({ comment, - getIcon: - icon && icon === processDirectory[pid]?.icon - ? () => - getInfoWithExtension( - fs, + getIcon: icon + ? undefined + : () => + getInfoWithExtension(fs, url, urlExt, ({ icon: extIcon }) => + callback({ + comment, + icon: extIcon || processDirectory[pid]?.icon, + pid, + subIcons, url, - urlExt, - ({ icon: extIcon }) => - extIcon && - callback({ - comment, - icon: extIcon, - pid, - subIcons, - url, - }) - ) - : undefined, + }) + ), icon: icon || UNKNOWN_ICON_PATH, pid, subIcons,