alex-z
50ffc7373f
Update file's metadata in the local database when the etag changes while file remains unchanged. Fix subsequent conflict when locking and unlocking.
...
Signed-off-by: alex-z <blackslayer4@gmail.com>
2022-12-30 16:57:32 +01:00
Claudio Cambra
ce57d3b3ab
Declare all QRegularExpressions statically
...
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2022-12-20 18:38:24 +01:00
Claudio Cambra
6fa2542a10
Categorise file name clash sync file issues as separate FileNameClash enum treated as warning
...
Signed-off-by: Claudio Cambra <claudio.cambra@gmail.com>
2022-09-26 12:10:38 +02:00
allexzander
b40c2dfe01
Revert "Remove behavior changes."
...
This reverts commit 84d06ce9906df7bb6d87bf7093dd11fac6a6057a.
Signed-off-by: allexzander <blackslayer4@gmail.com>
2022-09-17 09:47:15 +02:00
allexzander
d425005a29
Remove behavior changes.
...
Signed-off-by: allexzander <blackslayer4@gmail.com>
2022-09-17 09:47:15 +02:00
allexzander
ffb7fcad7d
Fix deprecation warnings.
...
Signed-off-by: allexzander <blackslayer4@gmail.com>
2022-09-17 09:47:15 +02:00
allexzander
65cd8d06bc
Do not ignore return values for SyncJournalDB in accountsettings folderstatusmodel activitylistmodel abstractpropagateremotedeleteyncrypted lockgilejobs and propagator jobs
...
Signed-off-by: allexzander <blackslayer4@gmail.com>
2022-09-17 09:47:15 +02:00
allexzander
d7950304ee
Do not ignore return values for SyncJournalDB calls in propagator jobs and discovery.
...
Signed-off-by: allexzander <blackslayer4@gmail.com>
2022-09-17 09:47:15 +02:00
Matthieu Gallien
dc95f29165
fetch and store in sync database information abot lock state of files
...
fetch lock properties from server
decode them and store them in sync database
test to ensure we do properly handle those properties
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2022-05-02 13:52:05 +02:00
Matthieu Gallien
a7adca84e2
remove wrong assert that is blocing the run of debug client
...
if the server has files with invalid modtime this assert will trigger
even though the code is handling the situation
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2022-03-17 23:28:02 +00:00
alex-z
225753a8c0
Refactor DeleteJob and DeleteApiJob to use SimpleFileJob.
...
Signed-off-by: alex-z <blackslayer4@gmail.com>
2022-01-11 13:37:09 +00:00
alex-z
190d278fd4
Checksum validation PropagateDownload unit tests.
...
Signed-off-by: alex-z <blackslayer4@gmail.com>
2022-01-11 13:37:09 +00:00
alex-z
b7be10f712
Ask server to recalculate checksum on validatin failure.
...
Signed-off-by: alex-z <blackslayer4@gmail.com>
2022-01-11 13:37:09 +00: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
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
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
9523c036d6
assert on invalid modtime
...
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2021-12-08 07:22:24 +00:00
alex-z
c52718c104
Replace deprecated QRegExp with QRegularExpression.
...
Signed-off-by: alex-z <blackslayer4@gmail.com>
2021-11-02 08:54:06 +00:00
Felix Weilbach
fb1b3481d1
Fix warnings
...
Signed-off-by: Felix Weilbach <felix.weilbach@nextcloud.com>
2021-09-17 13:32:26 +00:00
Felix Weilbach
0af83dd1b6
Use QRandomGenerator instead of qrand
...
Signed-off-by: Felix Weilbach <felix.weilbach@nextcloud.com>
2021-09-08 08:54:00 +00:00
allexzander
ba73b6d914
VFS + E2EE. Improved data alignment and unit tests for StreamingDecryptor. Refactoring and renaming for readability.
...
Signed-off-by: allexzander <blackslayer4@gmail.com>
2021-08-20 12:57:22 +00:00
allexzander
2c78925acb
VFS + E2EE VFS implicit hydration of E2EE files.
...
Signed-off-by: allexzander <blackslayer4@gmail.com>
2021-08-20 12:57:22 +00:00
Felix Weilbach
d72f7e9109
Check result of setPinState()
...
Signed-off-by: Felix Weilbach <felix.weilbach@nextcloud.com>
2021-08-11 20:20:39 +00:00
Hannah von Reth
6e0a43b570
Fix clash detection with virtual files
...
Fixes : #8323
2021-08-11 17:13:44 +00:00
allexzander
8122c63ebc
Revert Added config parameter that allows to bypass checksum validation failure.
...
Signed-off-by: allexzander <blackslayer4@gmail.com>
2021-07-28 07:57:10 +00:00
Hannah von Reth
e7e218d8e6
Improve the error message returned by updateMetadata
...
Also properly handle the case the the file can't be converted to a placeholder
as it is locked
2021-07-06 14:03:53 +00:00
Felix Weilbach
c799dbdd61
Cfapi: Make sure no data is transfered after cancellation
...
Signed-off-by: Felix Weilbach <felix.weilbach@nextcloud.com>
2021-06-17 09:10:06 +00:00
allexzander
dc72686ab3
Allow download with mismatched checksum if a config option is set.
...
Signed-off-by: allexzander <blackslayer4@gmail.com>
2021-06-10 13:39:11 +03:00
AJ Jordan
a51d0a14db
Improve error message
...
This one is more user-friendly and grammatically correct.
Signed-off-by: AJ Jordan <alex@strugee.net>
2021-06-03 11:25:47 +00:00
allexzander
d754bb7102
Fix review comments.
...
Signed-off-by: allexzander <blackslayer4@gmail.com>
2021-05-06 06:17:36 +00:00
allexzander
ef89256d39
VFS. Allow dehydartion of readonly files. Preserve 'readonly' flag when creating a placeholder.
...
Signed-off-by: allexzander <blackslayer4@gmail.com>
2021-05-06 06:17:36 +00:00
allexzander
19522210ac
VFS. Display local file name clash error when syncing in VFS mode.
...
Signed-off-by: allexzander <blackslayer4@gmail.com>
2021-05-05 17:34:59 +00:00
Matthieu Gallien
782a2fdf06
avoid an assert by delaying access to response timestamp when in error
...
when canceling the sync of a big directory, I can get some network
request that are aborted before a Date reply header has been read
in this case we would always access
AbstractNetworkJob::responseTimestamp() and fire the assert even if we
know that the network reply has an error
delay the access to after the possible errors have been dealt with
Signed-off-by: Matthieu Gallien <matthieu_gallien@yahoo.fr>
2021-04-20 17:42:17 +02:00
Valdnet
e628a51735
l10n: Unify spelling
...
Spelling unification in Nextcloud applications.
Signed-off-by: Felix Weilbach <felix.weilbach@nextcloud.com>
2021-04-13 12:24:57 +02:00
Felix Weilbach
9bf5b5c7ba
CFAPI: Handle cancelation of hydration requests
...
Signed-off-by: Felix Weilbach <felix.weilbach@nextcloud.com>
2021-03-18 10:43:48 +00:00
Kevin Ottens
7c8b7db725
Don't detect file changes during hydration for virtual files
...
Indeed, that file size will almost always change between the 1 byte
placeholder and the hydrated file. Only when using the CfAPI on Windows
this won't be the case since because it will expose the original size
even for placeholders.
Also worth noting: the suffix backend didn't hit that case since the
filename changes (with suffix for placeholders, without for hydrated
files).
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2021-01-14 12:57:03 +01:00
Hannah von Reth
aadda32633
Handle errors in convertToPlaceholder
2020-12-30 16:17:47 +01:00
Kevin Ottens
c57eff6fd8
Please the clang-tidy overlord
...
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-12-15 11:01:53 +01:00
Hannah von Reth
ebd8047cb6
Replace custome date parser QDateTime::fromString(value, Qt::RFC2822Date)
2020-12-15 11:01:52 +01:00
Hannah von Reth
1b4ccea083
Owncloud - virtual files smaller <1KB - problems with syncing
...
The issue was caused by gziped responses not providing a
content lenght header.
Fixes : #8248
2020-12-15 10:59:27 +01:00
Kevin Ottens
36b8e7c2a4
Remove the encryption flag check from encrypted propagation code
...
If we use those encrypted propagation code paths, we already know from
the discovery phase (and thus the journal db) that the folders are
encrypted so no need to check again.
This will remove another expensive round trip with the server.
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-12-15 10:59:23 +01:00
Kevin Ottens
7a4a359704
Stop using e2e()->isFolderEncrypted() in the jobs
...
Thanks to the new discovery algorithm, we got all the freshest E2EE
information straight from the database so reuse it instead of going
through an in memory copy.
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-12-15 10:59:22 +01:00
Kevin Ottens
af00ef1cca
Don't use getFileRecordByE2eMangledName in jobs anymore
...
Thanks to the new discovery algorithm we got both mangled and original
file names in the item so no need to go through the database for
nothing.
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-12-15 10:59:21 +01:00
Hannah von Reth
93152761a1
Use verbose function names instead of direct member access
2020-12-15 10:59:20 +01:00
Hannah von Reth
c1a91e91e7
Use the servers checksum type by default
2020-12-15 10:59:16 +01:00
Olivier Goffart
1c10fceacc
SyncEngine: no need to use QAtomicInt
...
This was done because the propagator jobs where running in a thread a long
time ago, but this is no longer the case.
(Also QAtomicInt::load is marked as deprecated now)
2020-12-15 10:59:05 +01:00
Olivier Goffart
66f7b27121
VFS: Do not overwrite existing files by placeholder
...
For issue #7557 and #7556
Note: this change the API of the VFS plugin, so the VFS plugin needs small
adaptations
2020-12-15 10:59:03 +01:00
Christian Kamm
3446412d92
PropagateDownload: Don't try to open readonly temporaries
...
This situation could arrise when receiving a read-only share and the
temporary rename failed for some reason.
See #7419
2020-12-15 10:58:58 +01:00
Christian Kamm
ea829f96ca
Download: Don't trigger too many concurrent hash computations
...
Previously the job would only become "active" when the downloads
started. That meant that arbitrarily many hash computations could be
queued at the same time.
Since the the file was opened during future creation this could lead to
a "too many open files" problem if there were lots of new-new conflicts.
To change this:
- Make PropagateDownload become active when computing a hash
asynchronously.
- Make the computation future open the file only once it gets run. This
will make it less likely for this problem to occur even if thousands
of these futures are queued.
For #7372
2020-12-15 10:58:55 +01:00