From 07571a698d32eb414c24cdf84327d1868a0b455a Mon Sep 17 00:00:00 2001 From: Randall Winkhart Date: Thu, 8 Jan 2026 19:05:23 -0500 Subject: [PATCH] Handle age timestamping errors in syncLists --- docs/release-notes-archive/2026.md | 2 +- syncclient/client.go | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/docs/release-notes-archive/2026.md b/docs/release-notes-archive/2026.md index 32bd0ae..ce0eceb 100644 --- a/docs/release-notes-archive/2026.md +++ b/docs/release-notes-archive/2026.md @@ -1,7 +1,7 @@ **libmutton v0.5.0** Release date TBD -This release adds password age tracking support and features large refactors that improve the robustness of core functionality. Many breaking changes are present. Highlights are listed below. +This release adds password age-tracking support and features large refactors that improve the robustness of core functionality. Many breaking changes are present. Highlights are listed below. ## Breaking (for users+developers) - **USERS**: These changes *require* updating your copy of `libmuttonserver`; additionally, you *must* re-generate your config file however your client allows (e.g. `mutn init`) diff --git a/syncclient/client.go b/syncclient/client.go index 83091e4..f88b28f 100644 --- a/syncclient/client.go +++ b/syncclient/client.go @@ -293,7 +293,9 @@ func syncLists(sshClient *ssh.Client, sshEntryRoot string, sshIsWindows bool, ti fmt.Println(back.AnsiGreen+vanityPath+back.AnsiReset, "is newer on server, adding to download list") downloadList = append(downloadList, vanityPath) if remoteInfo.AgeTimestamp != nil { - age.Entry(vanityPath, *remoteInfo.AgeTimestamp) + if err := age.Entry(vanityPath, *remoteInfo.AgeTimestamp); err != nil { + return [3][]string{nil, nil, nil}, errors.New("unable to update age timestamp for " + vanityPath + ": " + err.Error()) + } } } else if remoteInfo.ModTime < localInfo.ModTime { fmt.Println(back.AnsiBlue+vanityPath+back.AnsiReset, "is newer on client, adding to upload list") @@ -315,7 +317,9 @@ func syncLists(sshClient *ssh.Client, sshEntryRoot string, sshIsWindows bool, ti return [3][]string{nil, nil, nil}, errors.New("unable to create containing folder for " + vanityPath + ": " + err.Error()) } if remoteInfo.AgeTimestamp != nil { - age.Entry(vanityPath, *remoteInfo.AgeTimestamp) + if err := age.Entry(vanityPath, *remoteInfo.AgeTimestamp); err != nil { + return [3][]string{nil, nil, nil}, errors.New("unable to update age timestamp for " + vanityPath + ": " + err.Error()) + } } }