From e7f1eba0fce7e5edffdbfdbc3767757875645fe4 Mon Sep 17 00:00:00 2001 From: vzhestkov Date: Tue, 30 Apr 2024 09:27:46 +0200 Subject: [PATCH] Remove redundant `_file_find` call to the master --- salt/fileclient.py | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/salt/fileclient.py b/salt/fileclient.py index d527cf5c96c..31a6b7122b0 100644 --- a/salt/fileclient.py +++ b/salt/fileclient.py @@ -1180,10 +1180,7 @@ class RemoteClient(Client): if senv: saltenv = senv - if not salt.utils.platform.is_windows(): - hash_server, stat_server = self.hash_and_stat_file(path, saltenv) - else: - hash_server = self.hash_file(path, saltenv) + hash_server = self.hash_file(path, saltenv) # Check if file exists on server, before creating files and # directories @@ -1224,10 +1221,7 @@ class RemoteClient(Client): ) if dest2check and os.path.isfile(dest2check): - if not salt.utils.platform.is_windows(): - hash_local, stat_local = self.hash_and_stat_file(dest2check, saltenv) - else: - hash_local = self.hash_file(dest2check, saltenv) + hash_local = self.hash_file(dest2check, saltenv) if hash_local == hash_server: return dest2check