mirror of
https://github.com/rwinkhart/libmutton.git
synced 2026-08-27 20:36:29 -04:00
Handle age timestamping errors in syncLists
This commit is contained in:
@@ -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`)
|
||||
|
||||
@@ -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())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user