Commit e0147f18 by Michael DeHaan

Merge pull request #6421 from bcoca/stat_noread_nomd5

now stat skips md5 if file isn't readable
parents 681dcf43 463a1c21
......@@ -132,8 +132,9 @@ def main():
if S_ISLNK(mode):
d['lnk_source'] = os.path.realpath(path)
if S_ISREG(mode) and get_md5:
d['md5'] = module.md5(path)
if S_ISREG(mode) and get_md5 and os.access(path,os.R_OK):
d['md5'] = module.md5(path)
try:
pw = pwd.getpwuid(st.st_uid)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment