aboutsummaryrefslogtreecommitdiffstats
path: root/atuin-client/src/record/sync.rs
diff options
context:
space:
mode:
authorEllie Huxtable <ellie@elliehuxtable.com>2023-08-07 11:18:39 +0100
committerGitHub <noreply@github.com>2023-08-07 11:18:39 +0100
commit0d5332a87facabb7227458586002226fafa11acb (patch)
tree719adf05cb0c5ae999e4e2fee00436c0376053ae /atuin-client/src/record/sync.rs
parentfix(docs): Correct command overview paths (#1145) (diff)
downloadatuin-0d5332a87facabb7227458586002226fafa11acb.zip
Prepare release v16.0.0 (#1143)
* Prepare release v16.0.0 * Remove debug output * Fix kv dupes if the store already exists * Add limit in frontend as well as sync backend
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);