Commit Graph

14 Commits

Author SHA1 Message Date
Hannah von Reth
edfe123e5f Rename csync_instructions_e -> SyncInsturctions 2020-04-23 11:52:05 +02:00
Olivier Goffart
fb84e4c990 When moving is allowed but deleting is not, do not restore moved items
Issue #7293
2019-10-11 13:09:07 +02:00
Olivier Goffart
1597b2edc1 Tests: introduce ItemCompletedSpy to avoid a bit of code duplication 2019-10-07 22:36:55 +02:00
Christian Kamm
976db2ef84 Test: Disable local discovery parallelism in permission test
Adding parallelism broke the test because it depended on the order of
discovery.
2019-09-16 19:52:19 +02:00
Christian Kamm
99fd45051a Discovery: If a move is forbidden, restore the source
Previously the source was deleted (or attempted to be deleted), even if
the new location was not acceptable for upload. This could make data
unavilable on the server.

For #7410
2019-09-02 09:58:59 +02:00
Christian Kamm
1e652e12b5 Propagation: Fix delete-before-rename bug #7441
By introducing a PropagateRootDirectory job that explicitly
separates the directory deletion jobs from all the other jobs.

Note that this means that if there are errors in subJobs the
dirDeletionJobs won't get executed.
2019-08-30 18:33:23 +02:00
Christian Kamm
3fb4a540da Tests: Fix DB locking issue in permissions test 2019-05-07 08:25:49 +02:00
Christian Kamm
db866afb60 Merge remote-tracking branch 'origin/2.5' 2019-03-14 08:34:19 +01:00
Christian Kamm
a39f4a532f OwnSql: Distinguish no-data from error #6677
This could fix a problem where the client incorrectly decides to delete
local data.

Previously any sqlite3_step() return value that wasn't SQLITE_ROW would
be interpreted as "there's no more data here". Thus an sqlite error at a
bad time could cause the remote discovery to fail to read an unchanged
subtree from the database. These files would then be deleted locally.

With this change sqlite errors from sqlite3_step are detected and
logged. For the particular case of SyncJournalDb::getFilesBelowPath()
the error will now be propagated and the sync run will fail instead of
performing spurious deletes.

Note that many other database functions still don't distinguish
not-found from error cases. Most of them won't have as severe effects on
affected sync runs though.
2019-03-05 09:15:38 +01:00
Olivier Goffart
597c28f316 Merge remote-tracking branch 'master' into new_discovery_algo 2018-08-21 11:22:38 +02:00
Christian Kamm
c8ecbc30ed RemotePermissions: Fix empty vs null
Fixes two bugs that appeared since the introduction of the struct:
- when reading permissions from the journal, null ("") was read as
  empty-not-null
- when reading permissinos from the server, empty ("") was read as null

Addresses #4608
2018-08-16 09:08:17 +02:00
Olivier Goffart
58d6632eaf Data-Fingerprint: Fix backup detection when fingerprint is empty
Add a test to test the data fingerprint feature make me realize it was broken.
The code was relying in the distinction between empty and null QByteArray,
but this was a bad idea as this difference is lost when going through QString.
2018-08-14 10:57:20 +02:00
Olivier Goffart
01f35bdbef New Discovery Algo: Permsission check 2018-07-25 18:32:21 +02:00
Olivier Goffart
a0675bd0ab Convert p7.pl to a C++ test
This is just a translation of test/scripts/txpl/t7.pl to C++ using the test
framework.
2018-07-25 13:48:58 +02:00