diff --git a/spyder/plugins/explorer/widgets/explorer.py b/spyder/plugins/explorer/widgets/explorer.py
index <HASH>..<HASH> 100644
--- a/spyder/plugins/explorer/widgets/explorer.py
+++ b/spyder/plugins/explorer/widgets/explorer.py
@@ -131,7 +131,12 @@ class IconProvider(QFileIconProvider):
         else:

             qfileinfo = icontype_or_qfileinfo

             fname = osp.normpath(to_text_string(qfileinfo.absoluteFilePath()))

-            return ima.get_icon_by_extension_or_type(fname, scale_factor=1.0)

+            if osp.isfile(fname) or osp.isdir(fname):

+                icon = ima.get_icon_by_extension_or_type(fname,

+                                                         scale_factor=1.0)

+            else:

+                icon = ima.get_icon('binary', adjust_for_interface=True)

+            return icon

 

 

 class DirView(QTreeView):
Files: Only try to assing icon to files and dirs

- Other objects (such as pipes and sockets) will be assigned the binary
icon by default.
- This avoid a total freeze when moving to a directory with a pipe in it.