Merge branch 'master' of git.opendreambox.org:/git/enigma2
authorFelix Domke <tmbinc@elitedvb.net>
Mon, 9 Feb 2009 14:11:11 +0000 (15:11 +0100)
committerFelix Domke <tmbinc@elitedvb.net>
Mon, 9 Feb 2009 14:11:11 +0000 (15:11 +0100)
lib/python/Components/FileList.py
lib/python/Plugins/Extensions/MediaPlayer/plugin.py

index a93d444..84abf32 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:
index 485dfe3..3e02384 100644 (file)
@@ -659,12 +659,16 @@ class MediaPlayer(Screen, InfoBarBase, InfoBarSeek, InfoBarAudioSelection, InfoB
 
        def copyDirectory(self, directory, recursive = True):
                print "copyDirectory", directory
-               filelist = FileList(directory, useServiceRef = True, isTop = True)
+               if directory == '/':
+                       print "refusing to operate on /"
+                       return
+               filelist = FileList(directory, useServiceRef = True, showMountpoints = False, isTop = True)
 
                for x in filelist.getFileList():
                        if x[0][1] == True: #isDir
                                if recursive:
-                                       self.copyDirectory(x[0][0])
+                                       if x[0][0] != directory:
+                                               self.copyDirectory(x[0][0])
                        elif filelist.getServiceRef() and filelist.getServiceRef().type == 4097:
                                self.playlist.addFile(x[0][0])
                self.playlist.updateList()