Commit Graph

1030 Commits

Author SHA1 Message Date
Jyrki Gadinger
7d51761a7a fix(remotewipe): do not reopen sync db before wiping
also use `FileSystem::removeRecursively` to properly handle deletion of
read-only directories/files

There's now an integration test for this feature after all those years
as well ;-)

Signed-off-by: Jyrki Gadinger <nilsding@nilsding.org>
2025-07-29 10:30:18 +02:00
Rello
0ccba7edfb fix(ignore-list): skip star pattern
Signed-off-by: Rello <Rello@users.noreply.github.com>
2025-07-18 08:48:34 +02:00
Matthieu Gallien
98061f71d9 feat: test to ensure etag constant means no PROPFIND on a folder
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>
2025-07-17 08:57:34 +02:00
Matthieu Gallien
acd27f1068 fix(sync): allow leading space file names on Windows
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2025-07-07 09:39:50 +02:00
Matthieu Gallien
d9bc9a3d95 fix(permissions): fix decoding share-attributes property
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2025-07-01 14:27:59 +02:00
Matthieu Gallien
4fcf31cb0b fix(permissions): decode share "no download" permission
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>
2025-07-01 14:27:59 +02:00
Matthieu Gallien
dac875ab89 fix(readonly): better handling of ACL on read-only files on windows
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2025-06-18 12:08:29 +02:00
Matthieu Gallien
66129ccaad fix(test/sync): add a single sync engine test with long paths
unfortunately does not cpature the requirements for proper long path
handling on Windows

maybe an end-to-end test could capture this requirement

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2025-06-05 11:06:41 +02:00
Jyrki Gadinger
27ede927d4 fix(lockfilejobs): ensure using correct file path
Signed-off-by: Jyrki Gadinger <nilsding@nilsding.org>
2025-06-02 15:59:17 +02:00
Matthieu Gallien
e555434e41 fix(readonly): avoid changing permissions when not needed
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>
2025-06-02 12:14:35 +02:00
Jyrki Gadinger
415a6e4366 fix(propagator): touch folder paths if permissions changed
Extra safeguard to ensure that the usage of
`FileSystem::setFolderPermissions` won't start a new sync run if
FolderWatcher/inotify detects a change in the file metadata...

Signed-off-by: Jyrki Gadinger <nilsding@nilsding.org>
2025-05-28 08:51:08 +02:00
Jyrki Gadinger
d9a0a6eab3 fix(filesystem): only change folder permissions if required
On Linux changing the permissions causes inotify to create a IN_ATTRIB
event -- even if the permissions stays the same.

Such an event is passed to the filesystem watcher which lets the client
schedule a new sync run.  In certain conditions, this could happen
during every sync run...

Signed-off-by: Jyrki Gadinger <nilsding@nilsding.org>
2025-05-28 08:51:08 +02:00
Matthieu Gallien
9ab875af0d fix(permissions): handle properly CanRead permission from server
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>
2025-05-26 18:45:06 +02:00
Matthieu Gallien
67bf4054dc fix(encryption): remove currently broken certificate hash handling
we may not currently properly store certificate hash for encrypted items
and later fails to find which public or private key pairs to use

for now, it is better to remove it and ensure we have a reliable way to
handle certificate migration

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2025-05-26 14:55:57 +02:00
Matthieu Gallien
91c8a12d46 fix(moveToTrash): enable use of move to trash in some automated tests
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>
2025-05-22 09:05:32 +02:00
Matthieu Gallien
a0532921ca fix(readonly): apply ACL also to files inside read-only folders
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2025-05-09 09:43:16 +02:00
Matthieu Gallien
15fafa0774 fix(rename): avoid failing hard when rename is rejected by server
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2025-05-09 09:42:11 +02:00
Andy Scherzinger
48e53ea216
docs(reuse): Migrate to SPDX header
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2025-05-07 23:06:34 +02:00
Camila Ayres
8d58bf30e7 test(syncenginetestutils): add quota-available-bytes and quota-used-bytes to dav propfind request.
Signed-off-by: Camila Ayres <hello@camilasan.com>
2025-05-07 19:09:36 +02:00
Andy Scherzinger
5fe94ea149 docs(reuse): Migrate to SPDX header
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2025-05-07 09:28:53 +02:00
Andy Scherzinger
49038ade94
docs(reuse): Migrate to SPDX header
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2025-04-25 17:27:21 +02:00
Jyrki Gadinger
e529195bbe fix(l10n): use proper plural forms in UserStatusSelectorModel
Many languages have different ways of handling plurals where checking
for `n == 1` is simply not enough.

Fixes #8149

Signed-off-by: Jyrki Gadinger <nilsding@nilsding.org>
2025-04-24 12:39:22 +02:00
Matthieu Gallien
c004fd4b5a
fix(rename): avoid hitting runtime assert when renaming virtual files
when propagating a rename to the child items, we must not make child
items be done from propagator point of view

they will be part of their own propagator item and that will create
issues

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2025-04-24 11:47:20 +02:00
Matthieu Gallien
505557ce7b
fix(rename): handle complex rename/move scenario
ensure we do not leak records and properly update them in client
database

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2025-04-24 11:47:19 +02:00
Matthieu Gallien
ff3bf03b8d
fix(autotests): do not remove read-only files already removed
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>
2025-04-18 16:32:27 +02:00
Matthieu Gallien
aa5eb0e869
fix(permissions): solve issues with file permissions automated tests
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2025-04-18 16:32:26 +02:00
Matthieu Gallien
83e9dbb617
fix(read only folder): allow renaming new file inside read-only folders
needed to download a new file inside a read-only folder

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2025-04-18 16:32:26 +02:00
Andy Scherzinger
00994aa9e8
docs(reuse): Migrate to SPDX header
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2025-04-16 15:19:26 +02:00
Claudio Cambra
b2836dd55b Use AccountPtr in testpushnotifications
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2025-04-15 17:08:10 +08:00
Camila Ayres
2bd2162ed1
test(cfapi): check for spurious attribute changes.
Signed-off-by: Camila Ayres <hello@camilasan.com>
2025-04-15 09:47:17 +02:00
Matthieu Gallien
98f8ce7a9c
fix: do not interrupt sync when cleaning invalid read-only items
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2025-04-14 17:00:55 +02:00
Matthieu Gallien
690f751ff5
disable use of bulk upload for small files
this feature causes many issues with impact on users so we prefer to
disable it again

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2025-04-10 16:10:20 +02:00
Matthieu Gallien
4b50c1de31 use maximum chunk size to decide the size of a bulk upload request
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2025-04-10 14:31:07 +02:00
Matthieu Gallien
e1a55fae1c with release 32.0.0 md5 custom checksum is removed from bulkupload
makes our fake server require an md5 custom checksum for bulk upload
until version 32.0.0

starting with 32.0.0 this custom checksum must be empty

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2025-04-10 10:40:17 +02:00
Matthieu Gallien
9c0382bb0b automated tests of bulk upload needs to check checksums like real
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2025-04-10 10:40:17 +02:00
Jyrki Gadinger
17c31fff3a fix: try to correct mtime on upsyncs
Files with a modification time of less than 0 do usually not make sense
(and afaik the server doesn't accept them either).
--> attempt to update the modification time to _Time.now_ while
propagating

side note: I ran into this because KArchive/Ark(?) didn't consider the
extra time attributes on entries for a certain zip file, so it instead
used the standard time value of each zip entry which was set to <= 1980
for files and < 1970 for directories...

Signed-off-by: Jyrki Gadinger <nilsding@nilsding.org>
2025-04-08 23:18:20 +02:00
Matthieu Gallien
86d2e21042 remove bogus check that tried to check for existing case clash conflict
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2025-04-08 17:15:14 +02:00
Matthieu Gallien
c3b338208c fix crash within FolderStatusModelTest
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2025-04-07 13:53:59 +02:00
Matthieu Gallien
a9293fd25b Qt 6.8 requires macSO 12 or higher: no need to compile against older
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>
2025-04-07 11:48:17 +02:00
Jyrki Gadinger
d99b48afab fix(gui): remove ignored file notifications from Activity list
These are informative notifications without any need/possibility to act
on immediately -- if a file is not synced it will be visible from the
shell integration anyway.

An eventual follow-up to this change would be to have a dialogue with an
overview of all files that were ignored (including the entry in the
ignore list that caused a specific file to be ignored).

Closes #6712

Signed-off-by: Jyrki Gadinger <nilsding@nilsding.org>
2025-04-04 13:50:15 +02:00
Matthieu Gallien
2daeaadead
skip single test or whole test file for macOS: they are broken
would need careful analyze to fix those

until we can get them fixed, better make the other tests be required in
the CI

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2025-03-18 09:51:16 +01:00
Pablo Ariño Muñoz
44f9aacda8 removed redundant qAsConst
Signed-off-by: Pablo Ariño Muñoz <progpabarino@gmail.com>
2025-02-25 11:54:54 +08:00
Pablo Ariño Muñoz
fc28fe95bb Replaced foreach with range loops
Signed-off-by: Pablo Ariño Muñoz <progpabarino@gmail.com>
2025-02-25 11:54:54 +08:00
Camila Ayres
425b038850 Add test for syncing with bulk upload when there are errors.
Signed-off-by: Camila Ayres <hello@camilasan.com>
2025-02-20 11:36:36 +01:00
Matthieu Gallien
7d96466050 prevent infinite sync loop: delay retry after many errors
10 seconds for try 3 and 4
30 seconds for try 5 and 6
60 seconds for more

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2025-02-20 10:09:27 +01:00
Matthieu Gallien
7ad3426eab ensure correct behavioron Windows for invalid file names
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2025-02-19 13:21:45 +01:00
Matthieu Gallien
4b176c21d4 try to enforce the windows compatibility as guessed from server
for now simple rule to guess if the server has windows naming enforced

if windows naming is enforced, we enforce it for new files

if not, we do not care

for now limited to spaces removal

more to come

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2025-02-19 13:21:45 +01:00
Matthieu Gallien
f198910534 automatic removing of invalid spaces in file names
to ensure compatibility with Widnows, we will remove automatically the
leading space characters in file name of new files or folders

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2025-02-19 13:21:45 +01:00
Matthieu Gallien
a39d6e85ec enforce trailing and leading spaces for new files
enforce trailing and leading space rules for new files and only for new
files but on all platforms, not only windows

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2025-02-19 13:21:45 +01:00
Jyrki Gadinger
7e819b3c04 use TextArea instead of TextEdit for share note field
it's already styled properly as it's part of Qt Quick Controls, **and**
it allows for a placeholder text!

also changed the logic for displaying the text field a bit ...

Fixes #7847

Signed-off-by: Jyrki Gadinger <nilsding@nilsding.org>
2025-02-14 13:53:44 +01:00