daca2: handle links better

This commit is contained in:
Daniel Marjamäki 2013-11-18 17:59:47 +01:00
parent ff5f223a1d
commit 007e2d9dd5
1 changed files with 2 additions and 0 deletions

View File

@ -110,6 +110,8 @@ def removeLargeFiles(path):
for g in glob.glob(path + '*'): for g in glob.glob(path + '*'):
if g == '.' or g == '..': if g == '.' or g == '..':
continue continue
if os.path.islink(g):
continue
if os.path.isdir(g): if os.path.isdir(g):
removeLargeFiles(g + '/') removeLargeFiles(g + '/')
elif os.path.isfile(g) and g[-4:] != '.txt': elif os.path.isfile(g) and g[-4:] != '.txt':