mirror of
https://github.com/nextcloud/desktop.git
synced 2025-10-26 11:17:43 +00:00
Do not overwrite with an invalid file_id.
This commit is contained in:
parent
e9920bd760
commit
c3e154b2e6
@ -139,12 +139,18 @@ static int _csync_merge_algorithm_visitor(void *obj, void *data) {
|
||||
|| cur->type == CSYNC_FTW_TYPE_DIR) {
|
||||
other->instruction = CSYNC_INSTRUCTION_RENAME;
|
||||
other->destpath = c_strdup( cur->path );
|
||||
csync_vio_set_file_id( other->file_id, cur->file_id );
|
||||
if( !c_streq(cur->file_id, INVALID_FILE_ID) ) {
|
||||
csync_vio_set_file_id( other->file_id, cur->file_id );
|
||||
}
|
||||
cur->instruction = CSYNC_INSTRUCTION_NONE;
|
||||
} else if (other->instruction == CSYNC_INSTRUCTION_REMOVE) {
|
||||
other->instruction = CSYNC_INSTRUCTION_RENAME;
|
||||
other->destpath = c_strdup( cur->path );
|
||||
csync_vio_set_file_id( other->file_id, cur->file_id );
|
||||
|
||||
if( !c_streq(cur->file_id, INVALID_FILE_ID) ) {
|
||||
csync_vio_set_file_id( other->file_id, cur->file_id );
|
||||
}
|
||||
|
||||
cur->instruction = CSYNC_INSTRUCTION_NONE;
|
||||
} else if (other->instruction == CSYNC_INSTRUCTION_NEW) {
|
||||
CSYNC_LOG(CSYNC_LOG_PRIORITY_TRACE, "OOOO=> NEW detected in other tree!");
|
||||
|
||||
Loading…
Reference in New Issue
Block a user