mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-28 11:48:56 +03:00
Allow newly created database in test.
This commit is contained in:
parent
b7d549e5a0
commit
4489eb6cc0
1 changed files with 6 additions and 1 deletions
|
@ -330,7 +330,12 @@ int csync_statedb_close(CSYNC *ctx, const char *statedb, int jwritten) {
|
|||
* the tmp db.
|
||||
*/
|
||||
if (jwritten) {
|
||||
if (_csync_statedb_check(ctx, statedb_tmp) == 0) {
|
||||
/* statedb check returns either
|
||||
* 0 : database exists and is fine
|
||||
* 1 : new database was set up
|
||||
* -1 : error.
|
||||
*/
|
||||
if (_csync_statedb_check(ctx, statedb_tmp) >= 0) {
|
||||
/* New statedb is valid. */
|
||||
|
||||
/* Move the tmp-db to the real one. */
|
||||
|
|
Loading…
Reference in a new issue