fix hashing when path is symlink
(cherry picked from commit 631a10745d
)
This commit is contained in:
parent
c9b0026cd0
commit
bc990004e1
1 changed files with 1 additions and 1 deletions
|
@ -2024,7 +2024,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)
|
||||||
|
|
Loading…
Reference in a new issue