Fix bug where we didn't update hash on updates
This commit is contained in:
parent
648db73628
commit
69438a78c6
1 changed files with 16 additions and 0 deletions
|
|
@ -236,6 +236,14 @@ export class UnrestrictedSyncer {
|
||||||
const responseBytes = deserialize(response.contentBase64);
|
const responseBytes = deserialize(response.contentBase64);
|
||||||
contentHash = hash(responseBytes);
|
contentHash = hash(responseBytes);
|
||||||
|
|
||||||
|
this.database.updateDocumentMetadata(
|
||||||
|
{
|
||||||
|
parentVersionId: response.vaultUpdateId,
|
||||||
|
hash: contentHash
|
||||||
|
},
|
||||||
|
document
|
||||||
|
);
|
||||||
|
|
||||||
await this.operations.write(
|
await this.operations.write(
|
||||||
actualPath,
|
actualPath,
|
||||||
contentBytes,
|
contentBytes,
|
||||||
|
|
@ -250,6 +258,14 @@ export class UnrestrictedSyncer {
|
||||||
type: SyncType.UPDATE
|
type: SyncType.UPDATE
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
this.database.updateDocumentMetadata(
|
||||||
|
{
|
||||||
|
parentVersionId: response.vaultUpdateId,
|
||||||
|
hash: contentHash
|
||||||
|
},
|
||||||
|
document
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
this.tryIncrementVaultUpdateId(response.vaultUpdateId);
|
this.tryIncrementVaultUpdateId(response.vaultUpdateId);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue