fix too large operation
This commit is contained in:
parent
02e03681f7
commit
bed28d9f0b
|
@ -165,6 +165,8 @@ export type DecisionTypeForMixedEntity =
|
|||
| "remote_is_modified_then_pull"
|
||||
| "local_is_created_then_push"
|
||||
| "remote_is_created_then_pull"
|
||||
| "local_is_created_too_large_then_do_nothing"
|
||||
| "remote_is_created_too_large_then_do_nothing"
|
||||
| "local_is_deleted_thus_also_delete_remote"
|
||||
| "remote_is_deleted_thus_also_delete_local"
|
||||
| "conflict_created_then_keep_local"
|
||||
|
|
20
src/sync.ts
20
src/sync.ts
|
@ -738,11 +738,9 @@ export const getSyncPlanInplace = async (
|
|||
keptFolder.add(getParentFolder(key));
|
||||
}
|
||||
} else {
|
||||
throw Error(
|
||||
`remote is created (branch 3) but size larger than ${skipSizeLargerThan}, don't know what to do: ${JSON.stringify(
|
||||
mixedEntry
|
||||
)}`
|
||||
);
|
||||
mixedEntry.decisionBranch = 36;
|
||||
mixedEntry.decision = "remote_is_created_too_large_then_do_nothing";
|
||||
keptFolder.add(getParentFolder(key));
|
||||
}
|
||||
} else if (
|
||||
(prevSync.mtimeSvr === remote.mtimeCli ||
|
||||
|
@ -801,11 +799,9 @@ export const getSyncPlanInplace = async (
|
|||
keptFolder.add(getParentFolder(key));
|
||||
}
|
||||
} else {
|
||||
throw Error(
|
||||
`local is created (branch 6) but size larger than ${skipSizeLargerThan}, don't know what to do: ${JSON.stringify(
|
||||
mixedEntry
|
||||
)}`
|
||||
);
|
||||
mixedEntry.decisionBranch = 37;
|
||||
mixedEntry.decision = "local_is_created_too_large_then_do_nothing";
|
||||
keptFolder.add(getParentFolder(key));
|
||||
}
|
||||
} else if (
|
||||
(prevSync.mtimeSvr === local.mtimeCli ||
|
||||
|
@ -899,6 +895,8 @@ const splitThreeStepsOnEntityMappings = (
|
|||
val.decision === "equal" ||
|
||||
val.decision === "conflict_created_then_do_nothing" ||
|
||||
val.decision === "folder_existed_both_then_do_nothing" ||
|
||||
val.decision === "local_is_created_too_large_then_do_nothing" ||
|
||||
val.decision === "remote_is_created_too_large_then_do_nothing" ||
|
||||
val.decision === "folder_to_skip"
|
||||
) {
|
||||
// pass
|
||||
|
@ -1013,6 +1011,8 @@ const dispatchOperationToActualV3 = async (
|
|||
} else if (
|
||||
r.decision === "equal" ||
|
||||
r.decision === "conflict_created_then_do_nothing" ||
|
||||
r.decision === "local_is_created_too_large_then_do_nothing" ||
|
||||
r.decision === "remote_is_created_too_large_then_do_nothing" ||
|
||||
r.decision === "folder_to_skip" ||
|
||||
r.decision === "folder_existed_both_then_do_nothing"
|
||||
) {
|
||||
|
|
Loading…
Reference in New Issue