@@ -118,16 +118,6 @@ export default class MergeSyncProcess extends DefaultSyncProcess {
118118 return
119119 }
120120
121- const concurrentRemoval = targetScanResult . REMOVE . getActions ( ) . find ( targetRemoval =>
122- // target removal removed this creation's target (via some chain)
123- Diff . findChain ( mappingsSnapshot , allCreateAndMoveActions , sourceTree , action . payload , targetRemoval , findChainCacheForCreations )
124- )
125- if ( concurrentRemoval ) {
126- avoidTargetReorders [ action . payload . parentId ] = true
127- // Already deleted on target, do nothing.
128- return
129- }
130-
131121 targetPlan . CREATE . commit ( action )
132122 } , ACTION_CONCURRENCY )
133123
@@ -193,16 +183,9 @@ export default class MergeSyncProcess extends DefaultSyncProcess {
193183 // Updated both on target and sourcely, source has precedence: do nothing sourcely
194184 return
195185 }
196- const concurrentRemoval = targetRemovals . find ( a =>
197- a . payload . findItem ( action . payload . type , Mappings . mapId ( mappingsSnapshot , action . payload , a . payload . location ) ) ||
198- a . payload . findItem ( ItemType . FOLDER , Mappings . mapParentId ( mappingsSnapshot , action . payload , a . payload . location ) ) )
199- if ( concurrentRemoval ) {
200- // Already deleted on target, do nothing.
201- return
202- }
203186
204187 targetPlan . UPDATE . commit ( action )
205- } )
188+ } , ACTION_CONCURRENCY )
206189
207190 await Parallel . each ( sourceScanResult . REORDER . getActions ( ) , async ( action ) => {
208191 if ( avoidTargetReorders [ action . payload . id ] ) {
@@ -217,17 +200,8 @@ export default class MergeSyncProcess extends DefaultSyncProcess {
217200 }
218201 }
219202
220- const findChainCache = { }
221- const concurrentRemoval = targetRemovals . find ( targetRemoval =>
222- Diff . findChain ( mappingsSnapshot , allCreateAndMoveActions , sourceTree , action . payload , targetRemoval , findChainCache )
223- )
224- if ( concurrentRemoval ) {
225- // Already deleted on target, do nothing.
226- return
227- }
228-
229203 targetPlan . REORDER . commit ( action )
230- } )
204+ } , ACTION_CONCURRENCY )
231205
232206 return targetPlan
233207 }
0 commit comments