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,
|
// !! we need to upsert the record,
|
||||||
// so that next time we can determine the change delta
|
// so that next time we can determine the change delta
|
||||||
const entity = r.remote ?? r.local;
|
// if we have prevSync, we store it because it should keep all necessary info
|
||||||
console.debug(
|
let entity = r.prevSync;
|
||||||
`we are in actual operation of equal, entity=${JSON.stringify(
|
// 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,
|
entity,
|
||||||
null,
|
r.local?.mtimeCli
|
||||||
2
|
|
||||||
)}`
|
|
||||||
);
|
);
|
||||||
|
}
|
||||||
if (entity !== undefined) {
|
if (entity !== undefined) {
|
||||||
await upsertPrevSyncRecordByVaultAndProfile(
|
await upsertPrevSyncRecordByVaultAndProfile(
|
||||||
db,
|
db,
|
||||||
|
Loading…
Reference in New Issue
Block a user