mirror of
https://github.com/chylex/Nextcloud-Desktop.git
synced 2025-04-13 04:15:43 +02:00
Improve the check for the inode.
This commit is contained in:
parent
356da661d7
commit
92bf414e4c
@ -98,14 +98,14 @@ static int csync_detect_update(CSYNC *ctx, const char *file, const csync_vio_fil
|
||||
/* check if the file has been renamed */
|
||||
if (ctx->current == LOCAL_REPLICA) {
|
||||
tmp = csync_journal_get_stat_by_inode(ctx, fs->inode);
|
||||
if (tmp == NULL) {
|
||||
/* file not found in journal */
|
||||
st->instruction = CSYNC_INSTRUCTION_NEW;
|
||||
goto out;
|
||||
} else {
|
||||
if (tmp != NULL && fs->inode == tmp->inode) {
|
||||
/* inode found so the file has been renamed */
|
||||
st->instruction = CSYNC_INSTRUCTION_RENAME;
|
||||
goto out;
|
||||
} else {
|
||||
/* file not found in journal */
|
||||
st->instruction = CSYNC_INSTRUCTION_NEW;
|
||||
goto out;
|
||||
}
|
||||
}
|
||||
/* remote and file not found in journal */
|
||||
|
Loading…
Reference in New Issue
Block a user