mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-23 13:35:58 +03:00
Don't create the remote directory if it doesn't exist.
This commit is contained in:
parent
afa3bd7b80
commit
c24411e5e5
1 changed files with 6 additions and 4 deletions
|
@ -47,11 +47,13 @@ time_t csync_timediff(CSYNC *ctx) {
|
|||
ctx->replica = ctx->remote.type;
|
||||
dp = csync_vio_opendir(ctx, ctx->remote.uri);
|
||||
if (dp == NULL) {
|
||||
if (csync_vio_mkdir(ctx, ctx->remote.uri, 0755) < 0) {
|
||||
CSYNC_LOG(CSYNC_LOG_PRIORITY_FATAL, "Unable to create directory on remote uri: %s - %s", luri, strerror(errno));
|
||||
/*
|
||||
* To prevent problems especially with pam_csync we shouldn't try to create the
|
||||
* remote directory here. Just fail!
|
||||
*/
|
||||
CSYNC_LOG(CSYNC_LOG_PRIORITY_FATAL, "Access dienied to remote uri: %s - %s", ctx->remote.uri, strerror(errno));
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
csync_vio_closedir(ctx, dp);
|
||||
|
||||
if (asprintf(&luri, "%s/csync_timediff.ctmp", ctx->local.uri) < 0) {
|
||||
|
|
Loading…
Reference in a new issue