don't use glob
authorFelix Domke <tmbinc@elitedvb.net>
Wed, 16 Nov 2005 00:44:13 +0000 (00:44 +0000)
committerFelix Domke <tmbinc@elitedvb.net>
Wed, 16 Nov 2005 00:44:13 +0000 (00:44 +0000)
lib/python/Tools/Directories.py

index 9cd2951..85da532 100644 (file)
@@ -42,6 +42,8 @@ def getRecordingFilename(basename):
                path = "/hdd/movies/" + filename
                if i > 0:
                        path += str(i)
                path = "/hdd/movies/" + filename
                if i > 0:
                        path += str(i)
-               if os.glob(path + "*").size() == 0:
+               try:
+                       open(path + ".ts")
+                       i += 1
+               except IOError:
                        return path
                        return path
-               i+=1