fix crash upon invalid mountpoint
[enigma2.git] / lib / python / Components / Scanner.py
index 95e2e8f5679bc07f0c456d72d5f53d65107c8549..d944c4c795bdb29fb4addf433bdf06a3491b56ac 100644 (file)
@@ -134,7 +134,7 @@ def scanDevice(mountpoint):
        paths_to_scan = list(paths_to_scan)
        
        from Components.Harddisk import harddiskmanager 
-       blockdev = mountpoint.split('/')[2]
+       blockdev = mountpoint.rsplit('/',1)[-1]
        error, blacklisted, removable, is_cdrom, partitions = harddiskmanager.getBlockDevInfo(blockdev)
 
        # now scan the paths