mirror of
https://github.com/remotely-save/remotely-save.git
synced 2024-06-07 21:10:45 +00:00
fix comparation of equality
This commit is contained in:
parent
ee224bf4f2
commit
3d213b2be8
15
src/sync.ts
15
src/sync.ts
@ -1096,14 +1096,17 @@ const dispatchOperationToActualV3 = async (
|
||||
) {
|
||||
// !! we need to upsert the record,
|
||||
// so that next time we can determine the change delta
|
||||
const entity = r.remote ?? r.local;
|
||||
console.debug(
|
||||
`we are in actual operation of equal, entity=${JSON.stringify(
|
||||
// if we have prevSync, we store it because it should keep all necessary info
|
||||
let entity = r.prevSync;
|
||||
// if we don't have prevSync, we use remote entity AND local mtime
|
||||
// as if it is "uploaded"
|
||||
if (entity === undefined && r.remote !== undefined) {
|
||||
entity = await decryptRemoteEntityInplace(r.remote, cipher);
|
||||
entity = await fullfillMTimeOfRemoteEntityInplace(
|
||||
entity,
|
||||
null,
|
||||
2
|
||||
)}`
|
||||
r.local?.mtimeCli
|
||||
);
|
||||
}
|
||||
if (entity !== undefined) {
|
||||
await upsertPrevSyncRecordByVaultAndProfile(
|
||||
db,
|
||||
|
Loading…
Reference in New Issue
Block a user