Commit Graph

1008 Commits

Author SHA1 Message Date
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
Matthieu Gallien
9949d0cb20 add test skeleton for OCC::FolderStatusModel
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2025-02-12 09:49:09 +01:00
Camila Ayres
f62efca6c4 Improve text returned when checking VFS availability.
- Display more clear error when adding local sync folder and when selecting remote folder.
- Modernize FolderWizardRemotePath::isComplete().
- Display the local folder path when warning that folder is already being synced.

Signed-off-by: Camila Ayres <hello@camilasan.com>
2025-02-11 09:08:26 +01:00
Matthieu Gallien
ee4bfc5629 disable some parts of the auto tests for end-to-end encryption
those tests are now broken and we think they do not bring much value

for now parts of them will be disabled until we get better automated
tests

realized while doing this that the secure drop tests are not independent
of each other

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2025-02-07 09:12:29 +01:00
Matthieu Gallien
f42c944e6a partial fix for broken automated tests
will use different validation method for hardware stored certificates
and pure software certificates emited by the nextcloud server

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2025-02-07 09:12:29 +01:00
Matthieu Gallien
2a52ec33b0 add support to use PKCS#11 harware token to store certifice for e2ee
Close #5685

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2025-02-07 09:12:29 +01:00
Integral
356e4f9296 refactor: replace QString() with QStringLiteral() for better performance
Signed-off-by: Integral <integral@member.fsf.org>
2025-01-31 15:11:02 +01:00
Fredrik Eriksson
294bb1adb3 Enable netrc tests
Test for spaces in usernames and passwords is disabled for now as it's
not supported by current implementation.

Signed-off-by: Fredrik Eriksson <feffe@fulh.ax>
2025-01-03 14:46:33 +01:00
Matthieu Gallien
b2b5fb793c ensure no crash due to uncatched exception from std c++ lib
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2025-01-02 10:20:27 +01:00
Claudio Cambra
60da482b79 Use std::next rather than adding to iterator in tests
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-12-20 16:26:57 +01:00
Claudio Cambra
ab51b11ca3 Use QTimeZone in startOfDay for QDate in tests
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-12-20 16:26:57 +01:00
Claudio Cambra
271f2eb9b6 Replace aAsConst with std::as_const in tests
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-12-20 16:26:57 +01:00
Matthieu Gallien
321c583b69 allow dehydrating pinned LNK files
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2024-12-16 16:15:40 +01:00
Camila Ayres
638f3a8647 Update tests for folder check to match fix.
Signed-off-by: Camila Ayres <hello@camilasan.com>
2024-12-12 12:15:44 +01:00
Claudio Cambra
d921411bd3 Replace dark/light icon roles with a single icon role in activity list model
We can just colour the relevant activity icon from QML based on the
palette text colour

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-12-09 11:11:37 +01:00
Matthieu Gallien
52e78b3ece when locking a file set If-Match header to ensure etag is correct
the file being locked may have been changed sinc the client synced it

so the server side file may have a modified etag. In such cases we do
not want to lock the file and would rather sync the nex server changes
before being able to lock the file

that would ensure that on client side the file being locked is matching
teh state of teh file on server side and would prevent inadvertently
overriding server changes

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2024-12-09 09:33:49 +01:00
Matthieu Gallien
60b1091e13 fix TestSyncConflictsModel by using locale aware test data
should ensure comparisons of locale aware text is compared against
locale aware test data

will remove portability issues especially on Windows

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2024-11-29 09:23:58 +01:00
Matthieu Gallien
f38c2b7f51 fix local discovery test for file names with spaces on windows
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2024-11-29 09:23:58 +01:00
Matthieu Gallien
9be169c856 fix regressions in automated tests for bulk upload
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2024-11-29 09:23:58 +01:00
Matthieu Gallien
71281cbd39 prevent out of bounds access in automated tests
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2024-11-22 11:14:21 +01:00
Matthieu Gallien
4923873ac8 ensure folder permissions are read-only when needed
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>
2024-11-21 12:06:57 +01:00
Claudio Cambra
9406131e52 Add test for correct handling of live photo mov deletion
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-11-20 14:39:51 +01:00
Claudio Cambra
ed71524aeb Add setIsLivePhoto method to FileInfo
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-11-20 14:39:51 +01:00