Commit graph

8238 commits

Author SHA1 Message Date
Claudio Cambra
8c091a2daa Hide share button for deleted and ignored files in tray activity
Signed-off-by: Claudio Cambra <claudio.cambra@gmail.com>
2021-12-20 16:07:11 +00:00
Valdnet
cedf079762
Remove parenthesis
Signed-off-by: Valdnet <47037905+Valdnet@users.noreply.github.com>
2021-12-17 08:53:35 +01:00
Matthieu Gallien
3e82466d5e ensure any errors after calling FileSystem::getModTime are handled
be sure that even in release mode no errors when calling getModTime
could be ignored

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2021-12-16 15:28:46 +01:00
alex-z
b66ba8ba0a Added sync stop when failed to cancel delete jobs.
Signed-off-by: alex-z <blackslayer4@gmail.com>
2021-12-15 13:41:30 +00:00
alex-z
6381acf85b Do not crash on findAndCancelDeletedJob.
Signed-off-by: alex-z <blackslayer4@gmail.com>
2021-12-15 13:41:29 +00:00
alex-z
2482ca7ea7 Fix CMake error in ECMAddAppIcon for mac.
Signed-off-by: alex-z <blackslayer4@gmail.com>
2021-12-14 17:31:21 +00:00
Matthieu Gallien
24f1d2ce89 fix review comment
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2021-12-14 15:28:42 +00:00
Matthieu Gallien
f581f71058 ensure bulk upload jobs finished after an error
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2021-12-14 15:28:42 +00:00
alex-z
3f3b752e44 Save folder settings to config when force-switching VFS.
Signed-off-by: alex-z <blackslayer4@gmail.com>
2021-12-14 16:33:35 +02:00
alex-z
1244e96681 Enforce VFS. Disable 'Make always available locally'.
Signed-off-by: alex-z <blackslayer4@gmail.com>
2021-12-14 15:03:57 +02:00
Matthieu Gallien
9a201a8963 force download from server for local files that have invalid dates
will trigger if local state is incoherent
like the file itself haveing 0 or negative modtime and the database not

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2021-12-14 10:00:59 +01:00
Matthieu Gallien
8ead035016 do not get stuck forever in sync in case of errors
when a local file has invalid date and we try to upload it, properly
handle the error such that we are not stuck forever in sync state

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2021-12-10 11:28:35 +01:00
Matthieu Gallien
66d981aa64 remove files which gets downloaded with an invalid modified time
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2021-12-09 10:00:36 +01:00
Matthieu Gallien
8696670909 add log statements for each new assert about invalid modified time
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2021-12-08 07:22:24 +00:00
Matthieu Gallien
791073bd28 recover from local invalid modifie time: force download from server
force file download if local modified time is invalid and server has
valid modified time

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2021-12-08 07:22:24 +00:00
Matthieu Gallien
41c86d6459 prevent cases where desktop client would store invalid modified time
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2021-12-08 07:22:24 +00:00
Matthieu Gallien
b1977dfb18 prevent injecting invalid modified time through CfApi calls
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2021-12-08 07:22:24 +00:00
Matthieu Gallien
76c8d7287e do not consider that a file has changed if its mtime is invalid
a mtime should never be 0 or negative

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2021-12-08 07:22:24 +00:00
Matthieu Gallien
389424c54b avoid downloading a file from server when modified time is invalid
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2021-12-08 07:22:24 +00:00
Matthieu Gallien
c9f63b5744 prevent invalid modified time from being propagated
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2021-12-08 07:22:24 +00:00
Matthieu Gallien
9523c036d6 assert on invalid modtime
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2021-12-08 07:22:24 +00:00
alex-z
77bf892809 Use different icon for a sync folder on Windows depending on zoom level.
Signed-off-by: alex-z <blackslayer4@gmail.com>
2021-12-07 15:48:16 +00:00
Matthieu Gallien
b053cf9e2a do not forget the path when renaming files with invalid names
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2021-12-07 11:35:38 +01:00
alex-z
25785841a3 Always prefill username from Windows login name based on server version
Signed-off-by: alex-z <blackslayer4@gmail.com>
2021-12-03 11:08:35 +02:00
rakekniven
7dfd8181fa l10n: Changed case of word
Reported at Transifex.

Signed-off-by: rakekniven <2069590+rakekniven@users.noreply.github.com>
2021-11-30 11:52:46 +00:00
Matthieu Gallien
c53159cb0c fix random error when updating CfApi metadata
initialiazing all fields in a structure is required to not have random
behavior

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2021-11-29 18:04:00 +01:00
Matthieu Gallien
1a9aade28e use the error message sent by the server for bulk upload
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2021-11-26 16:32:08 +01:00
Matthieu Gallien
34c4c28879 allow sending parallel batch of files: curretly disabled
can allow to send a new batch before the reply to a previous one is
received

due to concerns with the reliability on the server side this is disabled

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2021-11-26 16:32:08 +01:00
Matthieu Gallien
a272b34809 really check that this is a valid answer when receiving batch upload
we could somehow miss that the reply is missing proper fields

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2021-11-26 15:49:25 +01:00
Matthieu Gallien
05b8d1e40d batch upload: only handle file that are in the reply
do not handle all files sent but only received ones

should allow to submit more than one request in parallel

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2021-11-26 15:49:25 +01:00
Matthieu Gallien
e14502606c make sure we do not start a new batch when the previous one is not sent
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2021-11-26 15:49:25 +01:00
Matthieu Gallien
59953d857b use a proper constant for the size of batch
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2021-11-26 15:49:25 +01:00
Matthieu Gallien
f56985938d if BulkPropagatorJob abort after an error emit finished signal
prevent sync engine being stuck because of an error when preparing bulk
upload

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2021-11-26 12:48:38 +01:00
Matthieu Gallien
c194605c35 implement bulk upload
add PutMultiFileJob to send many files at once

use it in BulkPropagatorJob to implement bulk upload feature

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2021-11-24 16:17:47 +01:00
Matthieu Gallien
112be18635 read capabilities for bulk upload from server
use it in dedicated tests

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2021-11-24 16:17:47 +01:00
Matthieu Gallien
802c7ac906 make AbstractNetworkJob::errorString virtual: it is already overriden
in practice AbstractNetworkJob::errorString is already overriden but the
overrided code is probably never called while the intention looked like
the opposite

fix that by making the method virtual in base class

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2021-11-24 16:17:47 +01:00
alex-z
b03bf1c1f0 Pass username from Windows to login page.
Signed-off-by: alex-z <blackslayer4@gmail.com>
2021-11-24 10:04:22 +00:00
Matthieu Gallien
83a8058b51 improve logging for CfApi
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2021-11-23 13:41:29 +00:00
Matthieu Gallien
072e9d44bd gracefully handle one case of invalid handles
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2021-11-23 13:41:29 +00:00
Matthieu Gallien
a3013de6ea fix OCC::CfApiWrapper::handleForPath when path does not exist
sometime it can be called with a path that is already deleted

ensure we always go to the correct code path

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2021-11-23 13:41:29 +00:00
Matthieu Gallien
9eed62a854 remove too noisy log print
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2021-11-23 13:41:29 +00:00
alex-z
b3914f627d Cleanup system bindings from Windows when removing a local sync folder
Signed-off-by: alex-z <blackslayer4@gmail.com>
2021-11-23 08:32:55 +00:00
Matthieu Gallien
684d70985e fix button that should be disabled when force VFS
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2021-11-22 14:22:59 +01:00
Matthieu Gallien
12c6d6e3bd add a network access factory to qml engine
ensure network access made via qml are using our user agent

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2021-11-22 12:21:58 +00:00
Carl Schwan
38ac585e7c Add WheelHandler to the Search result list too
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2021-11-22 11:18:18 +00:00
Carl Schwan
892d289f38 [tray] Makes scrolling with a touchpad in activiy list more natural
This basically use the same method that is used in Kirigami and Plasma
Components3.

Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2021-11-22 11:18:18 +00:00
alex-z
8e6896ba03 Quick fix! Disable VFS folders removal for non-Windows VFS.
Signed-off-by: alex-z <blackslayer4@gmail.com>
2021-11-22 12:37:18 +02:00
Matthieu Gallien
f1d834df8e properly query sync journal DB to know when to run fix for VFS
the new method added to query the db is not working and so the fix for
vfs is executed at each sync run

the new method for bool was not really needed so let's just remove it
(and that will make the usage of SqlQuery be correct

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2021-11-19 14:19:04 +01:00
alex-z
73db636361 Added more logs to 'postProcessLocalNew'.
Signed-off-by: alex-z <blackslayer4@gmail.com>
2021-11-19 09:10:20 +00:00
alex-z
911e35bc50 Use QUrl::fromLocalFile to open local files in Unified Search results.
Signed-off-by: alex-z <blackslayer4@gmail.com>
2021-11-18 09:34:54 +00:00