aboutsummaryrefslogtreecommitdiffstats
path: root/atuin-client/src/record/sync.rs
diff options
context:
space:
mode:
Diffstat (limited to 'atuin-client/src/record/sync.rs')
-rw-r--r--atuin-client/src/record/sync.rs7
1 files changed, 6 insertions, 1 deletions
diff --git a/atuin-client/src/record/sync.rs b/atuin-client/src/record/sync.rs
index ebdb8eb2..ad9079ed 100644
--- a/atuin-client/src/record/sync.rs
+++ b/atuin-client/src/record/sync.rs
@@ -124,7 +124,12 @@ async fn sync_upload(
// we need to iterate from the remote tail, and keep going until
// remote tail = current local tail
- let mut record = Some(store.get(start).await.unwrap());
+ let mut record = if current_tail.is_some() {
+ let r = store.get(start).await.unwrap();
+ store.next(&r).await?
+ } else {
+ Some(store.get(start).await.unwrap())
+ };
let mut buf = Vec::with_capacity(upload_page_size);