Fixed timestamp displayed after import not being the updated one

This commit is contained in:
Philipp Wolfer 2025-05-04 15:18:14 +02:00
parent 54fffce1d9
commit 1f48abc284
No known key found for this signature in database
GPG key ID: 8FDF744D4919943B

View file

@ -124,7 +124,7 @@ func (c *TransferCmd[E, I, R]) Transfer(exp backends.ExportProcessor[R], imp bac
progress.Wait()
// Update timestamp
err = c.updateTimestamp(result, timestamp)
err = c.updateTimestamp(&result, timestamp)
if err != nil {
return err
}
@ -174,7 +174,7 @@ func (c *TransferCmd[E, I, R]) timestamp() (time.Time, error) {
return time.Time{}, errors.New(i18n.Tr("invalid timestamp string \"%v\"", flagValue))
}
func (c *TransferCmd[E, I, R]) updateTimestamp(result models.ImportResult, oldTimestamp time.Time) error {
func (c *TransferCmd[E, I, R]) updateTimestamp(result *models.ImportResult, oldTimestamp time.Time) error {
if oldTimestamp.After(result.LastTimestamp) {
result.LastTimestamp = oldTimestamp
}