From 16aaa4f330f8728447bd6a95b3e071596d504164 Mon Sep 17 00:00:00 2001 From: Randall Winkhart Date: Fri, 30 May 2025 01:18:40 +0000 Subject: [PATCH] Fix unused error values --- syncclient/client.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/syncclient/client.go b/syncclient/client.go index 0cb7012..d816e5c 100644 --- a/syncclient/client.go +++ b/syncclient/client.go @@ -267,6 +267,9 @@ func sftpSync(sshClient *ssh.Client, sshEntryRoot string, sshIsWindows bool, dow // set the modification time of the local file to match the value saved from the remote file (from before the download) err = os.Chtimes(localEntryFullPath, time.Now(), modTime) + if err != nil { + return errors.New("unable to set local file modification time: " + err.Error()) + } } if filesTransferred { @@ -326,6 +329,9 @@ func sftpSync(sshClient *ssh.Client, sshEntryRoot string, sshIsWindows bool, dow // set the modification time of the remote file to match the value saved from the local file (from before the upload) err = sftpClient.Chtimes(remoteEntryFullPath, time.Now(), modTime) + if err != nil { + return errors.New("unable to set remote file modification time: " + err.Error()) + } } if filesTransferred {