mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 09:23:56 +00:00
Merge pull request #6208 from terminalmage/issue6200
Fix caching of 0-byte files
This commit is contained in:
commit
403ca2671e
@ -622,9 +622,8 @@ class RemoteClient(Client):
|
||||
# This is a 0 byte file on the master
|
||||
with self._cache_loc(data['dest'], env) as cache_dest:
|
||||
dest = cache_dest
|
||||
if not os.path.exists(cache_dest):
|
||||
with salt.utils.fopen(cache_dest, 'wb+') as ofile:
|
||||
ofile.write(data['data'])
|
||||
with salt.utils.fopen(cache_dest, 'wb+') as ofile:
|
||||
ofile.write(data['data'])
|
||||
if 'hsum' in data and d_tries < 3:
|
||||
# Master has prompted a file verification, if the
|
||||
# verification fails, redownload the file. Try 3 times
|
||||
|
Loading…
Reference in New Issue
Block a user