should help ensure we send a PROPFIND only when the folder etag changes
if some metadata apparently change, this is not enough to send a
PROPFIND request
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
ensure we use currently existing server API to get the "no download"
permission
requires parsing some share-attributes new DAV property
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
in FilePermissionsRestore, first checks the folder permissions before
changing them
will avoid useless call changing permissions when not needed
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
if Readable permissions is missing, do nto try to download the file
if a file was downlaoded but Readable permission is now missing, remove
it
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
should improve coverage for move to trash feature to ensure this is
working as expected by users
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
the sync engine will remove invalid items inside read-only folders
not needed to remove them in tests and rather checks that they were
indeed removed
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
clean up preprocessor directives for older macOS releases that are not
supported by macOS minimum required release from the Qt 6.8 release we
require
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
a folder item must be set read-only if files or sub-folders cannot be
created
a folder item must be set read-write in all other situations
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
should ensure we are able to get files or dolders be deleted by sync
engine within read-only folders
would happen as the result of changes on server side being propagated
locally or when using selective sync
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
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
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.
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.
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
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.