mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-28 11:48:56 +03:00
In case of error dirring a rename, mark the source as updated
That way, the file will be saved in the DB again, and the next try, it will retry to rename
This commit is contained in:
parent
79bbbe75d7
commit
b028c64325
2 changed files with 7 additions and 3 deletions
|
@ -1913,7 +1913,7 @@ static int owncloud_rename(const char *olduri, const char *newuri) {
|
|||
} else {
|
||||
set_errno_from_neon_errcode(rc);
|
||||
if (rc != NE_OK && _progresscb) {
|
||||
_progresscb(newuri, CSYNC_NOTIFY_ERROR, http_result_code_from_session(),
|
||||
_progresscb(olduri, CSYNC_NOTIFY_ERROR, http_result_code_from_session(),
|
||||
(long long)(dav_session.error_string) ,dav_session.userdata);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -810,8 +810,12 @@ out:
|
|||
/* set instruction for the statedb merger */
|
||||
if (rc != 0) {
|
||||
st->instruction = CSYNC_INSTRUCTION_ERROR;
|
||||
if (other)
|
||||
if (other) {
|
||||
other->instruction = CSYNC_INSTRUCTION_ERROR;
|
||||
|
||||
/* We set the instruction to UPDATED so next try we try to rename again */
|
||||
st->instruction = CSYNC_INSTRUCTION_UPDATED;
|
||||
}
|
||||
}
|
||||
|
||||
return rc;
|
||||
|
|
Loading…
Reference in a new issue