mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-27 17:37:36 +03:00
Fix: set path correctly.
This commit is contained in:
parent
a3f29967f7
commit
5657ff3d34
1 changed files with 20 additions and 0 deletions
|
@ -90,6 +90,26 @@ static int _csync_detect_update(CSYNC *ctx, const char *file,
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
path = file;
|
||||||
|
len = strlen(path);
|
||||||
|
switch (ctx->current) {
|
||||||
|
case LOCAL_REPLICA:
|
||||||
|
if (strlen(path) <= strlen(ctx->local.uri)) {
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
path += strlen(ctx->local.uri) + 1;
|
||||||
|
break;
|
||||||
|
case REMOTE_REPLICA:
|
||||||
|
if (strlen(path) <= strlen(ctx->remote.uri)) {
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
path += strlen(ctx->remote.uri) + 1;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
path = NULL;
|
||||||
|
return -1;
|
||||||
|
break;
|
||||||
|
}
|
||||||
h = _hash_of_file(ctx, file );
|
h = _hash_of_file(ctx, file );
|
||||||
// FIXME: What if h == 0?
|
// FIXME: What if h == 0?
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue