1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

fix hashing when path is symlink

This commit is contained in:
Brian Coca 2017-04-05 18:40:29 -04:00 committed by Brian Coca
parent 0b585ec4fd
commit 631a10745d

View file

@ -2051,7 +2051,7 @@ class AnsibleModule(object):
(filename, algorithm, ', '.join(AVAILABLE_HASH_ALGORITHMS))) (filename, algorithm, ', '.join(AVAILABLE_HASH_ALGORITHMS)))
blocksize = 64 * 1024 blocksize = 64 * 1024
infile = open(filename, 'rb') infile = open(os.path.realpath(filename), 'rb')
block = infile.read(blocksize) block = infile.read(blocksize)
while block: while block:
digest_method.update(block) digest_method.update(block)