1
0
mirror of https://github.com/libretro/RetroArch synced 2025-03-13 16:18:37 +00:00

cloud sync: fix file resurrection ()

This commit is contained in:
Eric Warmenhoven 2024-11-25 06:18:59 -05:00 committed by GitHub
parent 6a17201d70
commit b6f798655a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -898,7 +898,17 @@ static void task_cloud_sync_diff_next(task_cloud_sync_state_t *sync_state)
{
/* the file has been deleted locally */
if (!CS_FILE_DELETED(server_file))
task_cloud_sync_delete_server_file(sync_state);
{
if (CS_FILE_DELETED(current_file))
/* previously saw the delete, now it's resurrected */
task_cloud_sync_fetch_server_file(sync_state);
else if (string_is_equal(CS_FILE_HASH(server_file), CS_FILE_HASH(current_file)))
/* server didn't change, delete from the server */
task_cloud_sync_delete_server_file(sync_state);
else
/* the server changed and local deleted, that's a conflict */
task_cloud_sync_resolve_conflict(sync_state);
}
else
{
/* already deleted, oh well */