Commit Graph

10996 Commits

Author SHA1 Message Date
Matthieu Gallien
39979f30de fix(windows/compatibility): rename automatically a file if is local
we would automatically rename a file with an invalid name

do this if the newly discovered file is local and not if it is on the
server (which would fail because the local file does not exists at all)

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2025-07-07 10:27:13 +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
0ee9f8c1be
fix(lockFileJobs): avoid accumulating connections about lock jobs
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2025-07-04 13:36:20 +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
a2d6b7616a fix(code/style): use const almost always (always when possible)
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
ff72dd32fb
fix(logs): less verbose logs
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2025-06-26 10:24:33 +02:00
Rello
b2d9086a50
Merge branch 'nextcloud:master' into master 2025-06-23 18:17:27 +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
d70771958d fix(crash): debug builds would not try to remove a not found job
in release builds we would happily try to remove an element from QList
with invalid index (-1) if the job is not found

avoid doing this in release builds and keep teh assert in debug builds

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2025-06-18 09:16:32 +02:00
Jyrki Gadinger
21ae972efb style: access static members through ::
Signed-off-by: Jyrki Gadinger <nilsding@nilsding.org>
2025-06-18 08:18:50 +02:00
Jyrki Gadinger
a15ed120ac fix(accountmanager): use defaults from configFile if setting was not present
This prevented e.g. "launchOnSystemStartup" to be set on a fresh
installation.

Signed-off-by: Jyrki Gadinger <nilsding@nilsding.org>
2025-06-18 08:18:50 +02:00
Jyrki Gadinger
5d8b9c77db fix(activitylistmodel): fix activities for e2ee files
the sharing/activity button was supposed to be hidden, but a later
change forgot to adapt the variable used for querying the file metadata
so it never could determine the e2e-status

Signed-off-by: Jyrki Gadinger <nilsding@nilsding.org>
2025-06-16 10:16:39 +02:00
Matthieu Gallien
fa6101ce21
feat(logs): provide better logs for network request replies
add a couple more info when receiving a reply to make it easier to link
the reply with the emitteed request

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2025-06-12 10:20:15 +02:00
Matthieu Gallien
99d4f16435 fix(windows/virtualFiles): prevent implicit hydration at API level
use the dedicated flag from CfApi to prevent self implicit hydration
requests

should ensure even more reliable handling of virtual files

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2025-06-07 18:08:39 +02:00
Matthieu Gallien
1ecab229d6 fix(warning): avoid compilation warning by specifying type
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2025-06-06 11:57:27 +02:00
Matthieu Gallien
a60e34cd82 perf(logs): do not print processing lines for not important instructions
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2025-06-05 15:47:37 +02:00
Matthieu Gallien
c837e1c010 fix(tests): will currently detect wrong attempts to access deleted files
with virtual files we may wrongly try to access a file we just deleted

in which case an assert should ensure we capture this during automated
tests

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2025-06-05 14:01:38 +02:00
Matthieu Gallien
d082f839d0 fix(logs): make one log message useful
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2025-06-05 14:01:38 +02:00
Rello
1ec8fe63ac Change qCDebug error logs to qCWarning 2025-06-05 09:24:32 +02:00
Rello
7e72ad28e1 Use warning log level for DB errors 2025-06-05 09:24:32 +02:00
Matthieu Gallien
1144ac4fd3 fix(get/file): avoid failing to download files under 20 MiB
if a file that uncompresses to a file size under 10 MiB, Qt will allow
it

for files with an higher size, they must not have higher compression
ratio than what Qt network stack expect

https://doc.qt.io/qt-6/qnetworkrequest.html#setDecompressedSafetyCheckThreshold

we will use a 2 times bigger threshold

Close https://github.com/nextcloud/desktop/issues/7470

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2025-06-04 13:52:57 +02:00
Matthieu Gallien
7f1b664ea2 fix(logs): remove extra logs
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2025-06-03 16:08:22 +02:00
Josh Richards
14423dc66a enh(debugArchive): Add reminder to redact before sharing
Closes #3189

Signed-off-by: Josh Richards <josh.t.richards@gmail.com>
2025-06-03 10:15:03 +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
Claudio Cambra
9ff78ac969 feat(shell_integration/macOS/FileProviderExt): Remove fast enumeration settings
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2025-06-02 15:15:32 +02:00
Matthieu Gallien
0723016769 fix(windows): when deleting a file use safe long windows path
will avoid getting a content access denied error because some paths is
too long for windows default limit and has to use the special syntax for
long path

see https://learn.microsoft.com/en-us/windows/win32/fileio/maximum-file-path-limitation?tabs=registry

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2025-06-02 12:15:32 +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
Matthieu Gallien
3c8aeee167 fix(readonly): avoid implicit hydration when modifying permissions
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2025-06-02 10:59:31 +02:00
Rello
ec84695d45
limit sync folder selection to dirs only
https://doc.qt.io/qt-6/qfiledialog.html#Option-enum

Signed-off-by: Rello <Rello@users.noreply.github.com>
2025-05-28 15:43:30 +02:00
François Guerraz
6ee1231148 Fix(gui/SslErrorDialog): implement parsing Strict-Transport-Security
This commit implements enabling enableStrictTransportSecurityStore
and setStrictTransportSecurityEnabled in the AccessManager-
provided QNetworkAccessManager.
On first connection, this will make QNetworkAccessManager save the
HSTS status of the host in cache if it was enabled by the server.
On future connections, this setting is loaded and if the server
presents an invalid certificate and the HSTS hint is not expired, the
connection fails without showing the dreaded "Cannot connect securely
to ..." dialog.

Signed-off-by: François Guerraz <francois@orographic.uk>
2025-05-28 09:44:50 +02:00
Camila Ayres
6408b81d03 fix(generalsettings): call setAndCheckNewUpdateChannel when user changes update channel.
Also translate the displayed update channel in restore button.

Signed-off-by: Camila Ayres <hello@camilasan.com>
2025-05-28 08:52:05 +02:00
rakekniven
631377a32d chore(i18n): Aligned spelling of "cannot"
Reported at Transifex

Signed-off-by: rakekniven <2069590+rakekniven@users.noreply.github.com>
2025-05-28 08:51:38 +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
alex-z
c25de8500e
Implement BulkPropagateDownloadJob for virtual files.
Signed-off-by: alex-z <blackslayer4@gmail.com>
2025-05-26 16:48:53 +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
Camila Ayres
9a4da8185c feat(ocupdater): display update channel name in text when use can not change it.
Signed-off-by: Camila Ayres <hello@camilasan.com>
2025-05-26 10:43:28 +02:00
Camila Ayres
8a0f66c9c5 feat(generalsettings): add option to restore default update channel.
Do not display message confirming change when it is setting the default channel.

Implements #7965.

Signed-off-by: Camila Ayres <hello@camilasan.com>
2025-05-26 10:43:28 +02:00
Matthieu Gallien
c62ce64b01 fix(readonly): ignore move to trash for read-èonly items
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2025-05-22 09:05:32 +02:00
Matthieu Gallien
db58703fc0 fix(delete): fix move to trash when parent folder is read-only
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2025-05-22 09:05:32 +02:00
Matthieu Gallien
584c81321f fix(delete): optimize item exist checks when propagating from server
QFileInfo::exists(filename) is the fastest method

alos avoid creating too many QFileInfo instances when we need it for
multiple purposes

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2025-05-22 09:05:32 +02:00
Matthieu Gallien
99d48e20f6 fix(delete): always print warnings when file deletions fail
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2025-05-22 09:05:32 +02:00
Jyrki Gadinger
9b911409ca fix(gui): disable DirectWrite on Win10 versions before 1809
Earlier versions of Windows will render each character as a square when
DirectWrite is in use.

See also: #8064

Signed-off-by: Jyrki Gadinger <nilsding@nilsding.org>
2025-05-20 09:34:28 +02:00
Matthieu Gallien
9dd719c5ae
fix(quota): do not prevent upload when quota info are not available
if we did not query the server info, we have no quota info
so do not prevent upload because of no quota info available

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2025-05-15 17:59:54 +02:00
Claudio Cambra
87acefedd7 feat(gui/macOS): Use separator that does not break the socket API
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2025-05-15 12:10:44 +02:00
Claudio Cambra
1852d3620e feat(gui/macOS): Reload exclude files on creation
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2025-05-15 12:10:44 +02:00
Claudio Cambra
4186750188 feat(gui/macOS): Do not send ignore list if it is just empty
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2025-05-15 12:10:44 +02:00
Claudio Cambra
e2a6ea518b feat(gui/macOS): Rather than perform back-and-forth for ignore list, just send on setup
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2025-05-15 12:10:44 +02:00