mirror of
https://github.com/nextcloud/desktop.git
synced 2024-10-25 05:45:42 +03:00
WIP: Try to catch a cleared remote path
This commit is contained in:
parent
e183854b58
commit
898d51f92d
2 changed files with 7 additions and 2 deletions
|
@ -417,6 +417,10 @@ int csync_update(CSYNC *ctx) {
|
|||
|
||||
rc = csync_ftw(ctx, ctx->remote.uri, csync_walker, MAX_DEPTH);
|
||||
|
||||
if( c_rbtree_size(ctx->remote.tree) == 0 && c_rbtree_size(ctx->local.tree) > 0 ) {
|
||||
ctx->error_code = CSYNC_ERR_REMOTE_CLEANUP;
|
||||
return -1;
|
||||
}
|
||||
csync_gettime(&finish);
|
||||
|
||||
CSYNC_LOG(CSYNC_LOG_PRIORITY_DEBUG,
|
||||
|
@ -968,11 +972,11 @@ bool csync_file_known( char *statedb_file, const char* url ) {
|
|||
int len;
|
||||
uint64_t h;
|
||||
csync_file_stat_t *sb;
|
||||
CSYNC *ctx = NULL;
|
||||
|
||||
if( ! url ) return false;
|
||||
|
||||
CSYNC *ctx = c_malloc(sizeof(CSYNC));
|
||||
|
||||
ctx = c_malloc(sizeof(CSYNC));
|
||||
ctx->statedb.file = statedb_file;
|
||||
|
||||
len = strlen(statedb_file);
|
||||
|
|
|
@ -91,6 +91,7 @@ enum csync_error_codes_e {
|
|||
CSYNC_ERR_LOCAL_CREATE,
|
||||
CSYNC_ERR_LOCAL_STAT,
|
||||
CSYNC_ERR_PROXY,
|
||||
CSYNC_ERR_REMOTE_CLEANUP,
|
||||
CSYNC_ERR_UNSPEC
|
||||
};
|
||||
typedef enum csync_error_codes_e CSYNC_ERROR_CODE;
|
||||
|
|
Loading…
Reference in a new issue