no remote path chacnge
This commit is contained in:
parent
19d5dc1999
commit
17a1f4d060
1 changed files with 93 additions and 314 deletions
|
|
@ -11,10 +11,7 @@ use super::{device_id_header::DeviceIdHeader, requests::CreateDocumentVersion};
|
|||
use crate::{
|
||||
app_state::{
|
||||
AppState,
|
||||
database::{
|
||||
InsertBroadcast,
|
||||
models::{StoredDocumentVersion, VaultId},
|
||||
},
|
||||
database::models::{StoredDocumentVersion, VaultId},
|
||||
},
|
||||
config::user_config::User,
|
||||
errors::{SyncServerError, client_error, server_error, write_transaction_error},
|
||||
|
|
@ -128,8 +125,6 @@ pub async fn create_document(
|
|||
);
|
||||
}
|
||||
|
||||
let path_changed = deduped_path != sanitized_relative_path;
|
||||
|
||||
let new_vault_update_id = last_update_id + 1;
|
||||
let new_version = StoredDocumentVersion {
|
||||
vault_update_id: new_vault_update_id,
|
||||
|
|
@ -146,17 +141,7 @@ pub async fn create_document(
|
|||
|
||||
state
|
||||
.database
|
||||
.insert_document_version(
|
||||
&vault_id,
|
||||
&new_version,
|
||||
transaction,
|
||||
InsertBroadcast {
|
||||
// A brand-new document is always a content change for peers.
|
||||
content_changed: true,
|
||||
// Origin needs to know if the server deduped its requested path.
|
||||
path_changed,
|
||||
},
|
||||
)
|
||||
.insert_document_version(&vault_id, &new_version, transaction)
|
||||
.await
|
||||
.map_err(server_error)?;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue