properly handle: non-accessible directories, 'None' (=list of mountpoints) with showM...
[enigma2.git] / lib / python / Components / FileList.py
index a93d444141847d27e3fbc016b6c14664a7215018..84abf32863b1bdd14b03290a2fae2c6f3447910f 100644 (file)
@@ -119,8 +119,6 @@ class FileList(MenuList):
        def changeDir(self, directory, select = None):
                self.list = []
 
-               if directory and not os_path.isdir(directory):
-                       directory = None
                # if we are just entering from the list of mount points:
                if self.current_directory is None:
                        if directory and self.showMountpoints:
@@ -138,6 +136,9 @@ class FileList(MenuList):
                                        self.list.append(FileEntryComponent(name = p.description, absolute = path, isDir = True))
                        files = [ ]
                        directories = [ ]
+               elif directory is None:
+                       files = [ ]
+                       directories = [ ]
                elif self.useServiceRef:
                        root = eServiceReference("2:0:1:0:0:0:0:0:0:0:" + directory)
                        if self.additional_extensions: