mirror of
https://git.sr.ht/~phw/scotty
synced 2025-05-10 18:27:03 +02:00
Fixed timestamp displayed after import not being the updated one
This commit is contained in:
parent
54fffce1d9
commit
1f48abc284
1 changed files with 2 additions and 2 deletions
|
@ -124,7 +124,7 @@ func (c *TransferCmd[E, I, R]) Transfer(exp backends.ExportProcessor[R], imp bac
|
||||||
progress.Wait()
|
progress.Wait()
|
||||||
|
|
||||||
// Update timestamp
|
// Update timestamp
|
||||||
err = c.updateTimestamp(result, timestamp)
|
err = c.updateTimestamp(&result, timestamp)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
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))
|
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) {
|
if oldTimestamp.After(result.LastTimestamp) {
|
||||||
result.LastTimestamp = oldTimestamp
|
result.LastTimestamp = oldTimestamp
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue