mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-29 20:28:57 +03:00
csync_update: Remove the check for csync_get_statedb_exists
This always returns true since _csync_statedb_is_empty also always
returns true. This function was initially intended to be a shortcut
in case the database doesn't contain any row, but has been broken since
27fb5d9128
and now won't return false
unless the statement fails.
The _last_db_return_error in _csync_detect_update would take care
of that code path in a more direct and clearer way anyway.
This commit is contained in:
parent
81e32e1a08
commit
4e90bd7a5a
1 changed files with 166 additions and 172 deletions
|
@ -170,7 +170,6 @@ static int _csync_detect_update(CSYNC *ctx, std::unique_ptr<csync_file_stat_t> f
|
|||
* renamed, the db gets queried by the inode of the file as that one
|
||||
* does not change on rename.
|
||||
*/
|
||||
if (csync_get_statedb_exists(ctx)) {
|
||||
tmp = csync_statedb_get_stat_by_path(ctx, fs->path);
|
||||
|
||||
if(_last_db_return_error(ctx)) {
|
||||
|
@ -341,11 +340,6 @@ static int _csync_detect_update(CSYNC *ctx, std::unique_ptr<csync_file_stat_t> f
|
|||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
CSYNC_LOG(CSYNC_LOG_PRIORITY_WARN, "Unable to open statedb" );
|
||||
ctx->status_code = CSYNC_STATUS_UNSUCCESSFUL;
|
||||
return -1;
|
||||
}
|
||||
|
||||
out:
|
||||
|
||||
|
|
Loading…
Reference in a new issue