diff --git a/drivers/ISOSR.py b/drivers/ISOSR.py index eb471e22b..355e4c9ec 100755 --- a/drivers/ISOSR.py +++ b/drivers/ISOSR.py @@ -119,7 +119,7 @@ def _loadvdis(self): return for name in filter(is_image_utf8_compatible, - util.listdir(self.path, quiet = True)): + util.listdir(self.path, quiet = True, depth=10)): fileName = self.path + "/" + name if os.path.isdir(fileName): util.SMlog("_loadvdis : %s is a directory. Ignore" % fileName) diff --git a/drivers/util.py b/drivers/util.py index 888cbdb98..8a9e85b7b 100755 --- a/drivers/util.py +++ b/drivers/util.py @@ -208,8 +208,8 @@ def pread3(cmdlist, text): SMlog(" pread3 SUCCESS") return stdout -def listdir(path, quiet = False): - cmd = ["ls", path, "-1", "--color=never"] +def listdir(path, quiet=False, depth=1): + cmd = ["find", path, "-maxdepth", str(depth)] try: text = pread2(cmd, quiet = quiet)[:-1] if len(text) == 0: