private static void OnItemConflicting(object sender, ItemConflictingEventArgs args)
{
IFileDataRetriever local = (IFileDataRetriever)args.SourceChangeData;
IFileDataRetriever remote = (IFileDataRetriever)args.DestinationChangeData;
if (local.FileData.Name != remote.FileData.Name)
{
args.SetResolutionAction(ConflictResolutionAction.SkipChange);
}
}
Hi there.
I'm using FileSyncProvider to do my synchronization jobs.
Here's my situation that I want/expect:
- If the same file on both replicas are modified (i.e. its content are changed), I want the conflict resolution policy to be latest writer wins.
- If the same file on both replicas are renamed to different names, I want to ignore these files and not do anything to them (i.e. skip any change)
I tried to do this using the code above. However, I get an exception error with this message: "An incorrect conflict resolution action was set on the OnConflict callback."
Can anyone offer a solution such that I can fulfill my situation successfully? Thank you!