Commit Graph

1066 Commits

Author SHA1 Message Date
Jyrki Gadinger
a313ea6aff fix(network): fall back to unlimited bandwidth in case the legacy global limit is still set
`-2` used to mean "Use global limits", which no longer exist since
3.17.0.  As any negative value results in the auto bandwidth limiter to
engage, this could result in unexpected slower sync speeds after a
client upgrade.

Let's just keep handling that value and assume that we want to use
unlimited bandwidth.

Fixes #8743

Signed-off-by: Jyrki Gadinger <nilsding@nilsding.org>
2025-10-23 13:59:38 +02:00
Jyrki Gadinger
bddb39df16 fix(account): do not consider URLs with a trailing slash as public links
Resolves #8929

Signed-off-by: Jyrki Gadinger <nilsding@nilsding.org>
2025-10-23 11:57:10 +02:00
Jyrki Gadinger
01526c34e5 fix(quota): parse quota values from servers as double
The server can respond with values like `2.58440798353E+12` instead of
a plain number like `2584407983530`.
`QVariant::toLongLong` does not recognise that as a valid number and
returns `0` instead, breaking the sync for some.

Also added a fallback value in case parsing the value as double doesn't
work either.

Fixes #8555

Signed-off-by: Jyrki Gadinger <nilsding@nilsding.org>
2025-10-16 09:13:03 +02:00
Jyrki Gadinger
224c9b1f12 fix(test): adapt updated error message strings
Signed-off-by: Jyrki Gadinger <nilsding@nilsding.org>
2025-10-13 08:38:03 +02:00
Matthieu Gallien
f02f6c906b chore(autotests): folders on-demand breaks the new test: skip it
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2025-10-07 08:51:02 +02:00
Matthieu Gallien
1ec98ee46e fix: folder delete/new conflict will be "delete"
should enable someone to delete a folder even if there is a new/delete
conflict happening for some other users

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2025-10-07 08:51:02 +02:00
Matthieu Gallien
491e7cd55c chore: fix all occurence of range-loop-detach clazy warning
see https://github.com/KDE/clazy/blob/master/docs/checks/README-range-loop-detach.md

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2025-10-07 08:51:02 +02:00
Matthieu Gallien
f5f4a0059e chore(vfs/windows): expect failed tests on windows VFS
on-demand populating of folders is breaking some tests

for now, we expect the failures

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2025-10-02 11:45:03 +02:00
Matthieu Gallien
ada0429c2d fix(vfs): fix regressions with folders on-demand tests
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2025-10-02 11:45:03 +02:00
Matthieu Gallien
b050fe7481 chore(db): do not create db records with invalid mtime
only add a Q_ASSERT for debug builds

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2025-10-02 11:45:03 +02:00
Matthieu Gallien
e1951508ab fix(tests): ensure we do not access items in empty QList
in autotests, we use some QList
ensure we do not blindly access items in an empty list

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2025-10-02 11:45:03 +02:00
Jyrki Gadinger
17a6d5b714 fix(test): manually keep track of the canonical local path of tempDir
Some tests (okay, just the RemoteWipeTest) check for the removal of the
local directory.  However, QFileInfo will return `/` as the canonical
file path if the directory no longer exists, breaking some asserts ...

Signed-off-by: Jyrki Gadinger <nilsding@nilsding.org>
2025-09-25 09:49:53 +02:00
Jyrki Gadinger
fffa90d0aa fix(test): return the canonical file path of the temp dir
Something changed in the file system layer between Qt 6.8 and Qt 6.9
that now results in temporary paths no longer be canonical by default
(i.e. `/private/var/folders/...` changed to `/var/folders/...`, which
confuses the unit tests).

See also: https://bugreports.qt.io/browse/QTBUG-140151

Signed-off-by: Jyrki Gadinger <nilsding@nilsding.org>
2025-09-25 09:49:53 +02:00
Matthieu Gallien
59d4b86b3a fix(macOS): replace deprecated Q_OS_MAC by Q_OS_MACOS platform detection
Qt documentation says Q_OS_MAC is deprecated and should not be used

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2025-09-25 09:49:53 +02:00
Jyrki Gadinger
b9f1467770 fix(activitylistmodel): avoid duplication of server notifications
This change might clean up notifications that have already been
dismissed from the web ui as well.

Resolves #6624

Signed-off-by: Jyrki Gadinger <nilsding@nilsding.org>
2025-09-23 13:04:05 +02:00
Rello
f0151d8564 Replace Share::TypeCircle with Share::TypeTeam
Signed-off-by: Rello <Rello@users.noreply.github.com>
2025-09-05 10:04:28 +02:00
Rello
91065d73e4 Modify Sharee type handling in testshareemodel
Signed-off-by: Rello <Rello@users.noreply.github.com>
2025-09-05 10:04:28 +02:00
Jyrki Gadinger
6d31c79ce9 fix(userstatusselector): avoid setting default emoji when only setting a message
Signed-off-by: Jyrki Gadinger <nilsding@nilsding.org>
2025-08-29 14:47:27 +02:00
Matthieu Gallien
a57f63fa02 feat(vfs): add a new API to create a list of placeholders at once
should allow to speed API calls to Windows CfApi by reducing their
numbers by asking for a list of new placeholders via a single call
instead of one for each new item

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2025-08-29 14:07:27 +02:00
Jyrki Gadinger
8f2f4b5f30
fix(test): implement virtual method
Signed-off-by: Jyrki Gadinger <nilsding@nilsding.org>
2025-08-26 14:30:03 +02:00
copilot-swe-agent[bot]
b7acb2e5df
feat: add busy status support with capabilities checking and UI integration
Co-authored-by: Rello <13385119+Rello@users.noreply.github.com>
2025-08-26 14:29:34 +02:00
rakekniven
26c1bc6be1 fix(i18n): Use SI symbol for minute
Signed-off-by: rakekniven <2069590+rakekniven@users.noreply.github.com>
2025-08-22 09:20:00 +02:00
Camila Ayres
d28dbb7c25
test(syncjournaldb): use QCOMPARE_GT.
Co-authored-by: Jyrki Gadinger <nilsding@nilsding.org>
Signed-off-by: Camila Ayres <hello@camilasan.com>
2025-08-13 10:53:20 +02:00
Camila Ayres
17001c60f9 test(syncjournaldb): add test for migrating folder quota columns.
For upgrading from 3.17 release candidate to final.

Signed-off-by: Camila Ayres <hello@camilasan.com>
2025-08-13 10:47:54 +02:00
Camila Ayres
95d7e54f7b test(syncjournaldb): folder quota default values.
Signed-off-by: Camila Ayres <hello@camilasan.com>
2025-08-13 10:47:54 +02:00
Jyrki Gadinger
91f8797e75 fix(folder): use the remotePath for the sidebar display name
Using the short local folder name has some interesting side effects,
such as ending up as being e.g. "C:\MySyncRoot" or "Desktop\MySyncRoot"
due to it just removing the path to the current user's home directory.

IMO using the remote path for the sidebar entry is more logical -- I
don't care where I synced it to locally, I just want to know what my
sync destination is.

To improve future maintenance I moved the generation of the sidebar
display name to a separate method, and added some quick unit tests.

Signed-off-by: Jyrki Gadinger <nilsding@nilsding.org>
2025-08-12 12:37:57 +02:00
Jyrki Gadinger
519f0f12b2 chore: remove obsolete and unused testfolder.cpp
Signed-off-by: Jyrki Gadinger <nilsding@nilsding.org>
2025-08-12 12:37:57 +02:00
Camila Ayres
800c5d71ff fix(TestRemoteDiscovery): extend the http error messages in the test.
Signed-off-by: Camila Ayres <hello@camilasan.com>
2025-08-08 09:07:53 +02:00
Camila Ayres
33a34f8769 fix(TestDownload): update test to match new error string.
Signed-off-by: Camila Ayres <hello@camilasan.com>
2025-08-08 09:07:53 +02:00
Matthieu Gallien
5842f880f7 fix: rename enum FileInfo::Etags to get a more unique name
rename FileInfo::Etags to FileInfo::EtagsAction to avoid any future
possibility that we would want to use this name for something else

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2025-08-01 11:25:36 +02:00
Matthieu Gallien
3126790b94 fix: better name for an enum value to make it easier to read the code
rename FileInfo::Etags::Validate to FileInfo::Etags::Keep

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2025-08-01 11:25:36 +02:00
Camila Ayres
9257c1eb54 test(syncengine): add enum for Etags Validate/Invalidate.
Signed-off-by: Camila Ayres <hello@camilasan.com>
2025-08-01 11:25:36 +02:00
Camila Ayres
54facc929f chore(quota): change log level and fix comment in test.
Signed-off-by: Camila Ayres <hello@camilasan.com>
2025-08-01 11:25:36 +02:00
Camila Ayres
4ad69d5945 refactor(quota): rename Quota struct to FolderQuota.
Signed-off-by: Camila Ayres <hello@camilasan.com>
2025-08-01 11:25:36 +02:00
Camila Ayres
eb9ba35188 test(localdiscovery): add function for quota check from db when syncing.
Signed-off-by: Camila Ayres <hello@camilasan.com>
2025-08-01 11:25:36 +02:00
Camila Ayres
ebee194e91 test(syncenginetestutils): add function helper to set FileInfo::FileInfoQuota quota.
Signed-off-by: Camila Ayres <hello@camilasan.com>
2025-08-01 11:25:36 +02:00
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