Commit Graph

20 Commits

Author SHA1 Message Date
Claudio Cambra f13a0fc732 Also prevent use of std::filesystem in macOS 10.14
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-03-28 19:11:57 +08:00
Matthieu Gallien 4844f326c1 newly created folders will be read-only when needed
Close #6296

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2024-03-12 23:30:02 +01:00
Matthieu Gallien bf7f87492a update automated test to work with read only folders
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2024-03-12 23:30:02 +01:00
Matthieu Gallien 706d9697d4 ensure we get proper logs for permissions automated tests
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2024-03-12 23:30:02 +01:00
Dimitri Papadopoulos 09521edbac Fix residual typos found by codespell
Signed-off-by: Dimitri Papadopoulos <3234522+DimitriPapadopoulos@users.noreply.github.com>
2023-09-16 20:36:56 +02:00
Matthieu Gallien 505021af03 enable debug log for some automated tests
should help investigate failure for automated tests

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2023-07-12 13:41:53 +02:00
Dimitri Papadopoulos 9d830e94f9 Fix typos found by codespell
Signed-off-by: Dimitri Papadopoulos <3234522+DimitriPapadopoulos@users.noreply.github.com>
2023-06-21 08:47:13 +02:00
Matthieu Gallien 61c792c6f4
fully qualify types in signals and slots
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2022-11-15 09:57:54 +01:00
alex-z 01eb050cd8 Do not remove files from a Group folder and its nested folders whe it is renamed or removed while not allowed.
Signed-off-by: alex-z <blackslayer4@gmail.com>
2022-03-09 10:54:39 +02:00
Hannah von Reth 4d615c31da
Rename csync_instructions_e -> SyncInsturctions 2020-12-15 10:59:10 +01:00
Olivier Goffart 83d743b66b
When moving is allowed but deleting is not, do not restore moved items
Issue #7293
2020-12-15 10:59:01 +01:00
Olivier Goffart 390af4d41b
Tests: introduce ItemCompletedSpy to avoid a bit of code duplication 2020-12-15 10:59:00 +01:00
Christian Kamm e91e1ca78f
Test: Disable local discovery parallelism in permission test
Adding parallelism broke the test because it depended on the order of
discovery.
2020-12-15 10:59:00 +01:00
Christian Kamm 28797baa39
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
2020-12-15 10:58:58 +01:00
Christian Kamm c9d1037622
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.
2020-12-15 10:58:58 +01:00
Christian Kamm 9f3578b276
Tests: Fix DB locking issue in permissions test 2020-12-15 10:58:50 +01:00
Christian Kamm 4bd062f5be
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.
2020-12-15 10:58:43 +01:00
Christian Kamm be0fa72fcb
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
2020-12-15 10:58:03 +01:00
Olivier Goffart ac24cdbde6
New Discovery Algo: Permsission check 2020-12-15 10:58:01 +01:00
Olivier Goffart 08e4ba3363
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-09-10 20:44:03 +02:00