use lstat()
instead of stat()
to properly handle symbolic links
This commit is contained in:
parent
970aad33df
commit
1db45dbd7a
@ -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
|
||||
~~~~~
|
||||
|
||||
|
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user