mirror of
https://github.com/nextcloud/desktop.git
synced 2025-10-26 11:17:43 +00:00
Set the right owner and group if possible.
This commit is contained in:
parent
971e85871a
commit
bac6f7d7b6
@ -221,6 +221,9 @@ static int _csync_push_file(CSYNC *ctx, csync_file_stat_t *st) {
|
||||
goto out;
|
||||
}
|
||||
|
||||
/* set owner and group if possible */
|
||||
csync_vio_chown(ctx, duri, st->uid, st->gid);
|
||||
|
||||
/* sync time */
|
||||
times[0].tv_sec = times[1].tv_sec = st->modtime;
|
||||
times[0].tv_usec = times[1].tv_usec = 0;
|
||||
@ -362,6 +365,9 @@ static int _csync_new_dir(CSYNC *ctx, csync_file_stat_t *st) {
|
||||
/* The chmod is needed here cause the directory could already exist. */
|
||||
csync_vio_chmod(ctx, uri, st->mode);
|
||||
|
||||
/* set owner and group if possible */
|
||||
csync_vio_chown(ctx, uri, st->uid, st->gid);
|
||||
|
||||
times[0].tv_sec = times[1].tv_sec = st->modtime;
|
||||
times[0].tv_usec = times[1].tv_usec = 0;
|
||||
|
||||
@ -409,6 +415,9 @@ static int _csync_sync_dir(CSYNC *ctx, csync_file_stat_t *st) {
|
||||
|
||||
ctx->replica = dest;
|
||||
|
||||
/* set owner and group if possible */
|
||||
csync_vio_chown(ctx, uri, st->uid, st->gid);
|
||||
|
||||
times[0].tv_sec = times[1].tv_sec = st->modtime;
|
||||
times[0].tv_usec = times[1].tv_usec = 0;
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user