use lstat() instead of stat() to properly handle symbolic links

This commit is contained in:
Łukasz Langa 2013-03-27 17:19:38 +01:00
parent 970aad33df
commit 1db45dbd7a
2 changed files with 6 additions and 1 deletions

View File

@ -36,6 +36,11 @@ under 10 minutes. Both tests on HFS+.
Change Log
----------
0.5.2
~~~~~
* bugfix: symbolic links are now properly skipped
0.5.1
~~~~~

View File

@ -101,7 +101,7 @@ def run(verbosity=1, test=False):
for path, _, files in os.walk(current_dir):
for f in files:
p = os.path.join(path, f)
st = os.stat(p)
st = os.lstat(p)
if not stat.S_ISREG(st.st_mode) or p == bitrot_db:
continue
paths.append(p)