diff --git a/atuin-client/src/sync.rs b/atuin-client/src/sync.rs index 99b423c2..1f0d3dd8 100644 --- a/atuin-client/src/sync.rs +++ b/atuin-client/src/sync.rs @@ -196,6 +196,8 @@ pub async fn sync(settings: &Settings, force: bool, db: &(impl Database + Send)) settings.network_timeout, )?; + Settings::save_sync_time()?; + let key = load_key(settings)?; // encryption key sync_upload(&key, force, &client, db).await?; @@ -204,7 +206,5 @@ pub async fn sync(settings: &Settings, force: bool, db: &(impl Database + Send)) debug!("sync downloaded {}", download.0); - Settings::save_sync_time()?; - Ok(()) }