Commit Graph

10821 Commits

Author SHA1 Message Date
Matthieu Gallien
1a5d043f79 fix: do not interrupt sync when cleaning invalid read-only items
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2025-04-14 16:38:43 +00:00
Matthieu Gallien
f0a9c5a302 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 14:56:34 +00:00
Matthieu Gallien
b352ab545e
simple way to add more logs related to upload progress
will be important to try to see upload performance bottlenecks

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2025-04-10 14:55:41 +02:00
Matthieu Gallien
937e1df1f5
clean up some no longer needed logs
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2025-04-10 14:55:41 +02:00
Matthieu Gallien
10ad077807
better logs to track sending of data during bulk upload
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2025-04-10 14:55:41 +02:00
Matthieu Gallien
c31bcc4cd4
clean code and logs during bulk upload
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2025-04-10 14:55:41 +02:00
Matthieu Gallien
39cf125c17
no need to disable buffering from Qt in POST requests
data of the files are ready in a memory buffer so Qt will not buffer
them anyway

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2025-04-10 14:55:41 +02:00
Matthieu Gallien
b0067c3988
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:55:41 +02:00
Matthieu Gallien
5b9284237a
remove useless log
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2025-04-10 14:55:40 +02:00
Matthieu Gallien
c74765a931
define content length header with bulk upload requests
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2025-04-10 14:55:40 +02:00
Matthieu Gallien
2ed48e9c7d
use memory to buffer the data of the files sent during bulk upload
should help make it faster to send all data

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2025-04-10 14:55:40 +02:00
Matthieu Gallien
f84d41b9bf
disable buffering when POSTing for bulk upload
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2025-04-10 14:55:40 +02:00
Camila
c7cffd9b56
Change bulk upload batch size when there is a sync error.
- Cancel sync after try with smaller bulk upload batch size also throws error.
- Continue syncing when there is no error.
- Remove file from bulk upload black list only when upload succeeded.

Signed-off-by: Camila <hello@camila.codes>
2025-04-10 14:54:13 +02:00
Matthieu Gallien
ec0e2d6ce0 only send the md5 custom checksum header when server expects it
server before 32.0.0 release expects a custom header with an MD5
checksum during bulk upload

the header name is: X-File-MD5

see https://github.com/nextcloud/server/pull/51729

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2025-04-10 09:31:04 +00:00
Matthieu Gallien
c67469e044 fix format of checksum header that was missing checksum type
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2025-04-10 09:31:04 +00:00
Matthieu Gallien
a287326f8f sending header X-File-MD5 that is currently mandatory
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2025-04-10 09:31:03 +00:00
Jyrki Gadinger
910cd64831 fix FileSystem::setModTime on x64 Windows with times > 2038
also removes some unused Utility methods

Signed-off-by: Jyrki Gadinger <nilsding@nilsding.org>
2025-04-09 07:13:22 +00:00
Jyrki Gadinger
6f5f977534 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-09 07:13:22 +00:00
Matthieu Gallien
147a033f88 stop using QFile api to delete a single local file
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2025-04-08 21:05:06 +00:00
Matthieu Gallien
7aa76f57eb remove costly availability check that is never used
we never read the value computed

computing it means a recursive visit of the whole folder hierarchy which
could be taking a long time

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2025-04-07 13:53:29 +02:00
Matthieu Gallien
31b10e519c better error message for user when deleting local items
we might be displaying too technical errors that the user will have no
way to understand

for example on macOS, we might be getting:
Unknown error: 513

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2025-04-07 10:53:38 +00:00
Matthieu Gallien
b97f7eb84c when deleting a folder starts by making it read-write permissions
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2025-04-07 10:53:38 +00:00
Matthieu Gallien
bf1a13913a we must not use QFile::remove that may fail on windows read-only files
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2025-04-07 10:53:38 +00:00
Matthieu Gallien
69599b010f if we are going to need modified permissions: always change
we might need to change the permissions, so do it instead of trying to
be smart

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2025-04-07 10:53:38 +00:00
Matthieu Gallien
1b2db61ce4 do not change permissions of invalid items on discovery
if we are going to delete those items, we will make them have the proper
permissions when we need

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2025-04-07 10:53:38 +00:00
Matthieu Gallien
a0136117ca always make the file we try to delete be read-write as required
on windows you must only delete read-write files

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2025-04-07 10:53:38 +00:00
Matthieu Gallien
85e31029f7 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 10:53:37 +00:00
Jyrki Gadinger
cefb1d061e 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:03:11 +00:00
Claudio Cambra
e91a0c181c gui/macOS: Properly retain/release NSFileProviderManager(s)
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2025-03-27 14:16:05 +00:00
Claudio Cambra
de082e05f3 gui/macOS: Avoid need to retain/release things in file provider edit locally
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2025-03-27 14:16:05 +00:00
Claudio Cambra
90a66f5a5d gui/macOS: Avoid crash from bad manager release
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2025-03-27 14:16:05 +00:00
Claudio Cambra
3df4cece3a gui/macOS: Avoid retain call on extensionNcAccount by allocing new string
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2025-03-27 14:16:05 +00:00
Claudio Cambra
1b296b4afc gui/macOS: Improve overall memory management in XPCUtils::getDomainManagers
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2025-03-27 14:16:05 +00:00
Claudio Cambra
5f9f3c31c0 gui/macOS: Do not leak debug log string after use
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2025-03-27 14:16:05 +00:00
Claudio Cambra
44fc083fed gui/macOS: Use explicit type in connections array arg
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2025-03-27 14:16:05 +00:00
Claudio Cambra
6eca65b888 gui/macOS: Correctly release objects received via FileProviderUtils functions
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2025-03-27 14:16:05 +00:00
Claudio Cambra
1b56f2e38a gui/macOS: Properly wait for eviction result in materialised items model
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2025-03-27 14:16:05 +00:00
Claudio Cambra
d97b5b5711 gui/macOS: Do not leak local url and error objects in edit locally job
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2025-03-27 14:16:05 +00:00
Claudio Cambra
ebf48b0497 gui/macOS: Correctly retain/release manager and domain in sync status object
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2025-03-27 14:16:05 +00:00
Claudio Cambra
c2f5acab82 gui/macOS: Constify some Obj-C pointers
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2025-03-27 14:16:05 +00:00
Claudio Cambra
46679e84c3 gui/macOS: Avoid unnecessary retain on alloced objects
Fixes leaks

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2025-03-27 14:16:05 +00:00
Claudio Cambra
548524dd09 gui/macOS: Avoid leaking objc objects added to arrays and dicts
The array/dict will retain them

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2025-03-27 14:16:05 +00:00
Jyrki Gadinger
d9b6148758 set CFBundleDevelopmentRegion to "en" and set CFBundleAllowMixedLocalizations
according to [1] the value should be a ISO 639-1 code, so let's correct
it

`CFBundleAllowMixedLocalizations` is the most interesting one: with this
being set the reported QLocale will no longer be English as well

(this also bumps the version info to 2025 :D)

[1]: https://developer.apple.com/documentation/bundleresources/information-property-list/cfbundledevelopmentregion

Signed-off-by: Jyrki Gadinger <nilsding@nilsding.org>
2025-03-26 17:27:39 +00:00
Jyrki Gadinger
b1e1f6f0e8 gui/tray: change the status icon background colour again
As discussed, it's supposed to be the same colour as the header
background indeed...

Signed-off-by: Jyrki Gadinger <nilsding@nilsding.org>
2025-03-26 15:21:30 +00:00
Claudio Cambra
3280ea27ac gui/macOS: Correctly release download/upload progress observers
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2025-03-26 11:46:53 +00:00
Claudio Cambra
67dcca0adb gui/macOS: Ensure file provider domain progress instances are correctly retained
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2025-03-26 11:46:53 +00:00
Claudio Cambra
59e3371cda gui/macOS: Do not assume accountState will always be valid
When removing an account this can change

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2025-03-25 11:12:23 +00:00
Claudio Cambra
b4bff5c5b7 gui/macOS: Constify methods in file provider socket controller
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2025-03-25 11:12:22 +00:00
Jyrki Gadinger
8502777f55 fix Windows build
`cl` didn't quite like it:

```
error C2445: result type of conditional expression is ambiguous: types 'QByteArray' and 'const char [1]' can be converted to multiple common types
```

just changing the `auto` to `QByteArray` results in the same compile error

Signed-off-by: Jyrki Gadinger <nilsding@nilsding.org>
2025-03-24 09:43:04 +00:00
Matthieu Gallien
2a2e74a50a use standard way to find the checkum type and really send it to server
will fix missing checksum for bulk upload

will ensure consistent behavior between bulk upload, plain old upload
and chunked upload

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2025-03-20 13:45:45 +00:00