mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-28 11:48:56 +03:00
For directories, do not consider the size as its invalid on remote.
This commit is contained in:
parent
10437db2f9
commit
0764ef1620
1 changed files with 8 additions and 1 deletions
|
@ -135,6 +135,7 @@ static int _csync_merge_algorithm_visitor(void *obj, void *data) {
|
|||
break;
|
||||
}
|
||||
} else {
|
||||
bool is_equal_files;
|
||||
/*
|
||||
* file found on the other replica
|
||||
*/
|
||||
|
@ -155,7 +156,13 @@ static int _csync_merge_algorithm_visitor(void *obj, void *data) {
|
|||
/* file on other replica is changed or new */
|
||||
case CSYNC_INSTRUCTION_NEW:
|
||||
case CSYNC_INSTRUCTION_EVAL:
|
||||
if (other->size == cur->size && other->modtime == cur->modtime) {
|
||||
if (other->type == CSYNC_VIO_FILE_TYPE_DIRECTORY &&
|
||||
cur->type == CSYNC_VIO_FILE_TYPE_DIRECTORY) {
|
||||
is_equal_files = (other->modtime == cur->modtime);
|
||||
} else {
|
||||
is_equal_files = ((other->size == cur->size) && (other->modtime == cur->modtime));
|
||||
}
|
||||
if (is_equal_files) {
|
||||
/* The files are considered equal. */
|
||||
cur->instruction = CSYNC_INSTRUCTION_NONE;
|
||||
other->instruction = CSYNC_INSTRUCTION_NONE;
|
||||
|
|
Loading…
Reference in a new issue