Fix issue where safe_walk would skip files

This commit is contained in:
Thomas S Hatch 2013-04-30 22:06:26 -06:00
parent 1e9579826d
commit 6a1ad32904

View File

@ -1050,10 +1050,10 @@ def safe_walk(dir_):
if stat.S_ISLNK(mode):
real = os.path.realpath(full)
try:
mode = os.stat(real).st_mode
if stat.S_ISDIR(mode):
if full.startswith(real):
continue
smode = os.stat(real).st_mode
if stat.S_ISDIR(smode):
if not full.startswith(real):
mode = smode
except os.error:
pass