daca2: don't check large files

This commit is contained in:
Daniel Marjamäki 2013-10-18 04:53:14 +02:00
parent 4f578a5e4b
commit 91e23c0660
1 changed files with 10 additions and 0 deletions

View File

@ -63,6 +63,16 @@ def removeAllExceptResults():
continue continue
count = 0 count = 0
def removeLargeFiles(path):
for g in glob.glob(path + '*'):
if g=='.' or g=='..':
continue
if os.path.isdir(g):
removeLargeFiles(g + '/')
elif g != 'results.txt':
statinfo = os.stat(g)
if statinfo.st_size > 100000:
os.remove(g)
def scanarchive(fullpath): def scanarchive(fullpath):
results = open('results.txt', 'at') results = open('results.txt', 'at')