meganz / sdk

MEGA C++ SDK
BSD 2-Clause "Simplified" License
1.34k stars 510 forks source link

SDK-1362. Fix issues with remote paths changes in syncs #2494

Closed polmr closed 3 years ago

polmr commented 3 years ago

updates on remote paths for syncs are only considered for active syncs after sync revamping. This reverts that and makes notice of inactive syncs changes in remote paths. Thus allows for apps to notice that and also be able to re-enable syncs whose remote went to the //bin an back

JenkinsMega commented 3 years ago

megasdk-crossAndroid-PRs SUCCEDED (1391) :+1:

JenkinsMega commented 3 years ago

megasdk_PR SUCCEDED (3734) :+1:

JenkinsMega commented 3 years ago

megasdk-winx64-PRs SUCCEDED (1216) :+1:

JenkinsMega commented 3 years ago

megasdk-crossAndroid-PRs SUCCEDED (1394) :+1:

JenkinsMega commented 3 years ago

megasdk_PR SUCCEDED (3737) :+1:

JenkinsMega commented 3 years ago

megasdk-winx64-PRs FAILED (1219) :-1:

polmr commented 3 years ago

Hi, now that we are using forEachUnifiedSync, it will also process Syncs which have a config but have failed already. I think once a sync failed, we should not change the reason (eg. sync fails and a week later the root node is moved to the trash. We shouldn't update the failure code at that time), so we should also add a condition for this processing, that the sync is at least not currently in an error state.

Ey Matt, there is a check in place for us.mSync (there is an active sync) before changing the state [failSync]:-) I'm pushing a commit to move the check up, to avoid looping to find the rubbish bin and clarify the code a little bit.

JenkinsMega commented 3 years ago

megasdk-crossAndroid-PRs SUCCEDED (1408) :+1:

JenkinsMega commented 3 years ago

megasdk_PR SUCCEDED (3751) :+1:

JenkinsMega commented 3 years ago

megasdk-winx64-PRs SUCCEDED (1234) :+1:

vtmateos commented 3 years ago

Tested ok on macOS.

JenkinsMega commented 3 years ago

megasdk-crossAndroid-PRs SUCCEDED (1489) :+1:

JenkinsMega commented 3 years ago

megasdk_PR SUCCEDED (3832) :+1:

JenkinsMega commented 3 years ago

megasdk-winx64-PRs SUCCEDED (1314) :+1: