Olivier Goffart
f258af1198
sqlite: Update bundled version to 3.26.0
...
For OS X and Windows.
2020-12-15 10:58:31 +01:00
Olivier Goffart
c31d3f277f
HttpCredentials: Do not re-enter the event loop
...
https://sentry.io/owncloud/desktop-win-and-mac/issues/777907931/
mention a crash in OCC::HttpCredentialsGui::showDialog
One possible explaination is that this is caused by re-entring the event loop.
So don't do that.
2020-12-15 10:58:31 +01:00
Olivier Goffart
51d2e41d8b
Chunking Move: Fix too many starting slashes in the destination header
...
Commit 6ca724f fixed it for the move case. But the upload MOVE did the same
Issue #6904
2020-12-15 10:58:31 +01:00
Olivier Goffart
0e56dfe3a4
Gui: do not show the settings when opening a virtual file
...
Issue #6764
2020-12-15 10:58:31 +01:00
Christian Kamm
c4dfa82661
SocketAPI: Overhaul ui for 'available locally' vs 'online only'
...
For #6815
2020-12-15 10:58:30 +01:00
Christian Kamm
aa382eda29
Db: Add wiping of pin state for subtrees
2020-12-15 10:58:30 +01:00
Christian Kamm
d956f518a8
vfs: Remove newFilesAreVirtual - use root PinState instead
...
This unifies how to deal with pin states.
Also enable reading a folders direct pin state vs its effective pin
state.
2020-12-15 10:58:30 +01:00
Olivier Goffart
62ec4c9330
Discovery: Handle the blacklistFiles from the server capabilities
...
Issue #434
Ideally one could add the blacklist to the exlucde reggexp, but this
is simpler
2020-12-15 10:58:30 +01:00
Christian Kamm
8fecff5153
Progress: Virtual file creation needs no transfer progress #6933
...
Treat virtual file creation as a size-less action, similar to
propagating renames or deletions.
2020-12-15 10:58:30 +01:00
Christian Kamm
cdf61b9e82
vfs: Show "new files are virtual" option only with vfs
...
If there's no vfs possibility, showing it makes little sense.
2020-12-15 10:58:30 +01:00
Christian Kamm
8f895fc83c
vfs: SocketAPI actions adjust pin state of directories #6815
...
Downloading a folder also sets its pin state; releasing a folder sets
its pin state.
2020-12-15 10:58:29 +01:00
Christian Kamm
486c25cb47
vfs: Use PinState in sync algorithm #6815
...
New files are virtual if the file's pin state is OnlineOnly.
2020-12-15 10:58:29 +01:00
Christian Kamm
68126ac208
vfs: Introduce PinState db storage #6815
...
The idea is to allow folders (and later maybe files?) to be
- pinned to be available locally
- pinned to be online only
- inherit their pin from the parent
Where this pinning only controls the default for new files.
Subfolders may have a different pin state, and contained files
may be hydrated or dehydrated based on user actions.
This value is stored in a new 'flags' table. The idea is to store
data there that doesn't necessarily exist for each metadata entry.
The selective sync state could be migrated to this table.
2020-12-15 10:58:29 +01:00
Olivier Goffart
a29320b18d
Discovery: Set right direction when restoring deleted discovery because it has modified files
...
(Catched by a faillure of t1.pl)
2020-12-15 10:58:29 +01:00
Olivier Goffart
6da96cd026
Port the exclude test to the QTest Framework
...
This is just a port to QtTest, I did not change the layout of the test.
I did search and replace to replace the assert with QCOMPARE/QVERIFY
I still call setup and setup_init like before (only explicitly, now)
Also ported the preformence tests to QBENCHMAK because windows don't have
gettimeofday.
Relates #6358
2020-12-15 10:58:29 +01:00
Christian Kamm
69144566ce
Database: Change path for new dbs to .sync_* #5904
...
This is to avoid issues on OSX, where the ._ prefix has special meaning.
Originally (before 2.3.2) ._ was necessary to guarantee exclusion. But
since then the .sync_ prefix is excluded as well.
This does not affect existing database files.
2020-12-15 10:58:28 +01:00
Christian Kamm
30294e0c9a
Vfs: Have a static list of potential plugins for now
...
Fixes in-source builds and other cases where more non-plugin directories
are created in src/libsync/vfs.
2020-12-15 10:58:28 +01:00
Christian Kamm
75b9976526
Vfs: Ensure older versions gracefully ignore winvfs folders
...
Previously there'd likely be a mess if a 2.6 winvfs folder was attempted
to be used with a 2.5 client. Now the older clients will ignore these
folders.
2020-12-15 10:58:28 +01:00
Christian Kamm
bdfda460e6
Vfs plugins: Available plugins must load
...
A plugin that can't be loaded due to dependency issues should not be
considered as available.
2020-12-15 10:58:28 +01:00
Olivier Goffart
fd410a5a84
SyncEngine: Ensure that the paths passed to the discovery ends with slashes
...
This was making the tx.pl test fail
2020-12-15 10:58:28 +01:00
Olivier Goffart
edd806960d
Propagator: Don't abort sync on error 503
...
Only do it when it is actually a maintenance mode
Issues #5088 , #5859 , https://github.com/owncloud/enterprise/issues/2637
2020-12-15 10:58:27 +01:00
Olivier Goffart
feb770eca7
Allow to open log window via command line to already running client
...
Issue: #4098
2020-12-15 10:58:27 +01:00
Dominik Schmidt
687eb9665d
Fix installation of vfs suffix plugin
2020-12-15 10:58:27 +01:00
Olivier Goffart
a7a54b6d11
VFS: Plugin needs to be installed, otherwise it can't be loaded
2020-12-15 10:58:27 +01:00
Olivier Goffart
47b2913357
Fix compilation warning
...
src/libsync/propagatorjobs.cpp:63:10: warning: lambda capture 'this' is not used [-Wunused-lambda-capture]
[this, &deleted](const QString &path, bool isDir) {
^~~~~
2020-12-15 10:58:27 +01:00
Christian Kamm
d87c2b803d
vfs: Make Vfs ctor explicit
2020-12-15 10:58:27 +01:00
Christian Kamm
305d439c41
vfs: Separate vfs availability from new-files-virtual
...
This helps support 2.5 settings where there are virtual files in the
tree but new files aren't created virtual.
It's also a prelude for #6815
There's currently no way of
- upgrading vfs plugins (a silent suffix->winvfs upgrade is attempted
once only, when moving to master)
- disabling vfs capabilities outright
2020-12-15 10:58:27 +01:00
Christian Kamm
1e5e884805
vfs: Don't always load plugins, check metadata
2020-12-15 10:58:26 +01:00
Christian Kamm
cc912f4d02
vfs: ensure backwards-compatible settings value is always set
2020-12-15 10:58:26 +01:00
Christian Kamm
b30f79edf6
vfs: Ensure SyncOptions::_vfs is never null
...
- Create a VfsOff derived class
- Make it a shared pointer shared with Folder::_vfs
2020-12-15 10:58:26 +01:00
Christian Kamm
842577e014
vfs: Switch order of deletion and journal removal in dehydration
...
To be more crash-resilient.
2020-12-15 10:58:26 +01:00
Christian Kamm
4e40b635da
vfs: Update outdated comment
2020-12-15 10:58:26 +01:00
Christian Kamm
d7ad7854c1
vfs: Ensure local discovery is done on dehydration request
2020-12-15 10:58:26 +01:00
Christian Kamm
f2b78b5efb
Folder settings: Keep "usePlaceholders" to be backwards compatible
2020-12-15 10:58:25 +01:00
Christian Kamm
fa2450cf11
vfs: Be more careful about Vfs instance ownership
2020-12-15 10:58:25 +01:00
Christian Kamm
9196aa8e0a
vfs: Remove VfsSuffixPrivate
2020-12-15 10:58:25 +01:00
Christian Kamm
5b26b739f0
vfs: Document ignored return value.
2020-12-15 10:58:25 +01:00
Christian Kamm
77e5b956d1
Plugin: Drop PluginLoader
2020-12-15 10:58:25 +01:00
Christian Kamm
9bc28e3006
Plugin: style fixes
2020-12-15 10:58:25 +01:00
Christian Kamm
a5264f7740
Checksums: Make file ownership more explicit
2020-12-15 10:58:24 +01:00
Christian Kamm
9ced8dd836
vfs: Improve modeFromString() signature
2020-12-15 10:58:24 +01:00
Christian Kamm
f502a526fa
Generalize Result<> class, add Optional<>
...
To make it nicer to use outside of HTTP results.
2020-12-15 10:58:24 +01:00
Christian Kamm
e7e6b839c0
vfs: Add API docs
2020-12-15 10:58:24 +01:00
Christian Kamm
85dd10eb9b
vfs: Fix dealing with missing vfs instance
...
Maybe there should just be a VfsOff instance to make this less error
prone.
2020-12-15 10:58:24 +01:00
Dominik Schmidt
bfe136da7a
Fix export of vfs functions
2020-12-15 10:58:23 +01:00
Dominik Schmidt
1104883fba
Cleanup CMake (output)
2020-12-15 10:58:23 +01:00
Christian Kamm
f074c1a07b
vfs: Add check for presence of win plugin
2020-12-15 10:58:23 +01:00
Christian Kamm
4bef96afe7
vfs: Make switching vfs on/off work again
2020-12-15 10:58:23 +01:00
Christian Kamm
fa6f3cd847
vfs: Fix plugin decision in wizards, sanitize loading
2020-12-15 10:58:23 +01:00
Christian Kamm
d5a3604d39
vfs: Reenable local metadata updating of vfs files
2020-12-15 10:58:23 +01:00
Christian Kamm
96f4fd46e5
vfs: Make some behaviors suffix-vfs specific
2020-12-15 10:58:23 +01:00
Christian Kamm
90827c8162
vfs: Allow remote renames to propagate as such
2020-12-15 10:58:22 +01:00
Christian Kamm
e0ae6012b1
vfs: Allow folders without vfs
2020-12-15 10:58:22 +01:00
Christian Kamm
e39d751b59
Fix big-folder detection when vfs is disabled
2020-12-15 10:58:22 +01:00
Christian Kamm
bee1b0edd4
vfs: Implement dehydration tagging
2020-12-15 10:58:22 +01:00
Christian Kamm
ae9a7e088f
vfs: Fix suffix detection and handling
2020-12-15 10:58:22 +01:00
Christian Kamm
1ed005aafe
winvfs: Better error reporting
...
- fix download and validation error reporting
- add tests
2020-12-15 10:58:22 +01:00
Christian Kamm
0f2ef42ba2
Fixes after rebase to master
...
- use vfs suffix in ProcessDirectoryJob
- fix include vfs.h
- fix local vio passing vfs
- fix checksum computation
- vfs mode use
- mingw lambda compile issue
2020-12-15 10:58:21 +01:00
Christian Kamm
2b20985875
winvfs: initial work
...
Done by ckamm and dschmidt
2020-12-15 10:58:21 +01:00
Christian Kamm
c3b1a872aa
FolderMan: Remove assumption of unique running sync
2020-12-15 10:58:21 +01:00
Christian Kamm
22e08cf6ad
Checksums: Work on QIODevice*s
...
Needed for cfapi where we want to feed data through a custom device
which retrieves data from the windows api.
2020-12-15 10:58:21 +01:00
Olivier Goffart
a6614c18f1
IgnoreListEditor: increase a bit the size
...
Should Help for issue #6641
2020-12-15 10:58:21 +01:00
Olivier Goffart
7c1871ae65
Account: Fix crash when deleting an account
...
We should not have request parented to the account, otherwise we might get
a loop on the deletion order.
Issue #6893
2020-12-15 10:58:21 +01:00
Christian Kamm
6b0bb66b17
LockWatcher: Add chrono header
2020-12-15 10:58:20 +01:00
Christian Kamm
582803b6bd
cjhash: Fix build fix
...
See 17a4055e8d658f24b1fc47c44fd2daf66c7d5dbf
2020-12-15 10:58:20 +01:00
Olivier Goffart
175b064364
cjhash: use Q_FALLTHROUGH
...
This fixes the warning
warning: unknown option after ‘#pragma GCC diagnostic’ kind [-Wpragmas]
Issue #6872
2020-12-15 10:58:20 +01:00
Kevin Ottens
cce3d6f6fc
Excludes: switch all the path handling to QString
...
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-12-15 10:58:20 +01:00
Olivier Goffart
1c443ad021
CMakeLists.txt: increment sqlite version
...
3.9 is required for custom index to work
2020-12-15 10:58:20 +01:00
Olivier Goffart
5e05b61d2f
csync_vio_locale: use QString for the path in opendir
...
So we don't have to convert to utf8 and back again
2020-12-15 10:58:20 +01:00
Olivier Goffart
f0c24cb6f9
Remove csync_misc: The code no longer use fnmatch
2020-12-15 10:58:20 +01:00
Olivier Goffart
3c3619f99a
Exclude: do everything with QString wiuthout converting to char*
2020-12-15 10:58:19 +01:00
Olivier Goffart
164051b0c9
ProcessDirectoryJob::process: optimize so there is only one map
2020-12-15 10:58:19 +01:00
Olivier Goffart
1783db5811
PropagateUpload: Avoid many allocations by using QByteArrayLiteral
2020-12-15 10:58:19 +01:00
Olivier Goffart
d6a0290058
Optimisation: Add a cache SyncJournalDb::mapChecksumType
...
No need to do two sql query for something that's always the same and
there are very few checksum types
2020-12-15 10:58:19 +01:00
Olivier Goffart
69de2d5180
Sync: optimize by removing setFileRecordMetadata
...
Inh most case we already have a record from before, so avoid doing a useless
lookup in the database.
In owncloudpropagator.cpp, directories do not have a checksum so no need
to call a function that preserves it
2020-12-15 10:58:19 +01:00
Olivier Goffart
7e1840bb2f
OwnSql: Speedup by avoiding allocating an error string on success
2020-12-15 10:58:18 +01:00
Gerhard Gappmeier
7e55ce6640
owncloudcmd: fix compiliation with TOKEN_AUTH_ONLY
2020-12-15 10:58:18 +01:00
Gerhard Gappmeier
b3792ac1f0
libsync: Fix build error with TOKEN_AUTH_ONLY
...
When enabling TOKEN_AUTH_ONLY, the code path using QPainter is disabled.
So we also don't need the includes.
This header is not available for Remarkable.
2020-12-15 10:58:18 +01:00
Gerhard Gappmeier
ff9bd84c45
Disable stack protector features when cross compiling
...
When cross-compiling this for remarkable using the poky toolchain
this results in linker errors with stack protector: libssp_nonshared.a
not found
2020-12-15 10:58:18 +01:00
Gerhard Gappmeier
6aead6425e
Add CMake option to disable GUI build
2020-12-15 10:58:18 +01:00
Kevin Ottens
9131a68ec4
Get DatabaseErrorTest to pass
...
The E2EE code path would get the engine to go wrong in case of db error.
It's just better to have a failing upload or failing mkdir later in those
cases.
Emitting signals from a ctor is a bad idea anyway
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-12-15 10:58:18 +01:00
Olivier Goffart
bb9ce8db21
Test that the sync behave well if there are errors while reading the database
2020-12-15 10:58:17 +01:00
Olivier Goffart
b79e57d1c1
Discovery: fix double emission of finished in case of error
2020-12-15 10:58:17 +01:00
Olivier Goffart
7061f31887
Discovery: Fix downloading files when database is used for local discovery
...
This also fix the currently failling LockedFilesTest
2020-12-15 10:58:17 +01:00
Olivier Goffart
0eaa950e9e
Remove csync.cpp: It's only dead code
2020-12-15 10:58:17 +01:00
Christian Kamm
0d49056a13
Add Ctrl-L as log window shortcut
...
F12 is taken on OSX and there's no other way of showing it.
2020-12-15 10:58:17 +01:00
Christian Kamm
9d55590d10
Test: Add test for locked file tracking and propagation
2020-12-15 10:58:17 +01:00
Christian Kamm
da178c1352
Folder: Treat file unlock similar to external change #6822
...
For consistent handling of incoming notifications.
2020-12-15 10:58:17 +01:00
Christian Kamm
815e0fee8f
Propagator: Add assert against duplicate done() calls
2020-12-15 10:58:16 +01:00
Olivier Goffart
eb23776f16
Discovery: Fix renaming on windows
...
buf.type is ItemFileSkip because csync_vio_local_stat does not set this field
2020-12-15 10:58:16 +01:00
Olivier Goffart
beee123c80
New Discovery: Fix trailing slash causing failure on windows
2020-12-15 10:58:16 +01:00
Olivier Goffart
60b17cd128
Folder: update the folder version
...
Since the new index would crash old version of the client, we need to
upgrade folder version so they do not load in the client 2.5.0
2020-12-15 10:58:15 +01:00
Christian Kamm
7de453d439
Settings: Make FoldersWithPlaceholders group sticky
...
If virtual files are disabled on a folder it might still have db entries
or local virtual files that would confuse older client versions.
2020-12-15 10:58:15 +01:00
Olivier Goffart
ab85c60205
owncloudcmd: Read the server version from the capabilities
...
Issue: #6846
2020-12-15 10:58:15 +01:00
Olivier Goffart
3e4486c078
owncloudcmd: fetch the dav user
...
This is required to get the new endpoint working when the server
uses ldap or that the dav user is not the same as the login.
Issue #6830
2020-12-15 10:58:15 +01:00
Olivier Goffart
ec8c02dad0
Sharing: add the shareWithAdditionalInfo
string in autocompletion results
...
Issue #6749
2020-12-15 10:58:15 +01:00
Olivier Goffart
380d7b8028
Migration from 2.4: fallback to move file by file if directory move failled ( #6807 )
...
Migration from 2.4: fallback to move file by file if directory move failed
This can happen if the directory already exist because, say, it was
created by the ownCloud outlook plugin which save its file in the same directory
2020-12-15 10:58:15 +01:00
Olivier Goffart
e20e1d110f
Move: Fix too many starting slashes in the destination header
...
QDir::cleanPath does not remove starting slashes on windows.
So use account::davUrl which is already cleaned
Issue: #6824
2020-12-15 10:58:15 +01:00
Olivier Goffart
dcfbde2a67
Wizard: Reset the QSslConfiguration before checking the server
...
Because a previous call with another demain might have set some
config for another server.
Issue #6832
2020-12-15 10:58:14 +01:00
Olivier Goffart
b820e46805
Fix compiler warning
2020-12-15 10:58:14 +01:00
Olivier Goffart
35967fc2d6
OAuth2: Refresh the token without aborting the sync
...
OAuth2 access token typically only has a token valid for 1 hour.
Before this patch, when the token was timing out during the sync, the
sync was aborted, and the ConnectionValidator was then requesting a new
token, so the sync can be started over.
If the discovery takes longer than the oauth2 validity, this means that
the sync can never proceed, as it would be always restarted from scratch.
With this patch, we try to transparently renew the OAuth2 token and restart
the jobs that failed because the access token was invalid.
Note that some changes were required in the GETFile job because it handled
the error itself and so it was erroring the jobs before its too late.
Issue #6814
2020-12-15 10:58:14 +01:00
Olivier Goffart
53a14c2041
HttpCredentials: initialize all member inline
2020-12-15 10:58:14 +01:00
Dominik Schmidt
5d9370594d
Disable autostartCheckBox if autostart is configured system wide
2020-12-15 10:58:14 +01:00
Christian Kamm
00edcf98a1
Discovery: Virtual file handling adjustments
...
- adjust virtual file path handing
- helpers for vfs suffix adding/removal
- helpers for isDirectory/isVirtual on SyncJournalRecords
- be clear about what PathTuple _local/_server mean
2020-12-15 10:58:14 +01:00
Olivier Goffart
58eaf9940a
Database: Add an index on the parent path
...
So we can quickly query the items in a parent directory
This uses a custom slite3 function, which means that when downgrading the client,
or using another tool to add entries in the database, any insertion in the metadata
table will produce an error: "unknown function: parent_hash()"
(This will crash the client 2.5)
2020-12-15 10:58:13 +01:00
Olivier Goffart
e45e57982d
Add missing export
2020-12-15 10:58:13 +01:00
Christian Kamm
b431f4ef0c
Discovery: Fix log output for instructions
2020-12-15 10:58:13 +01:00
Christian Kamm
ce420d77a8
Discovery: Don't rebuild invalidFilname regex each call
2020-12-15 10:58:13 +01:00
Christian Kamm
113124cde5
Discovery: Introduce smaller functions
2020-12-15 10:58:13 +01:00
Christian Kamm
4f6f706f40
Excludes: drop csyncTraversalMatchFun()
...
The new discovery can call the traversal match function directly.
2020-12-15 10:58:13 +01:00
Olivier Goffart
a4e139969c
Fix windows build
2020-12-15 10:58:12 +01:00
Olivier Goffart
8490664860
Account Settings: fix progress being written in white when there are errors
2020-12-15 10:58:12 +01:00
Christian Kamm
dd34cbc751
Virtual files: Wipe selective sync settings when enabled
2020-12-15 10:58:12 +01:00
Christian Kamm
60de1c9720
virtual files: show option only when branding allows it
2020-12-15 10:58:12 +01:00
Christian Kamm
251e01a440
Virtual files: Use theme to check for option availability
2020-12-15 10:58:12 +01:00
Olivier Goffart
94e63ef7b9
Account Settings: Add a context menu entry to enable or disable virtual files
...
Issue #6725
2020-12-15 10:58:12 +01:00
Olivier Goffart
18f6e346b8
Upload: Do not error out if the server do not send the X-OC-MTime: accepted header
...
If the server does not set the mtime, it is not a big problem for the
synchronisation.
The test was used before so we could do a PROPPATCH for server that did not
support this header. But now that all server supports that we don't need to
to the check. (We do not do the PROPPATCH since we got rid of the neon
dependency)
Apparently, it may happen that some backend don't support setting mtime
and this can lead to this error.
https://github.com/owncloud/client/issues/6797
2020-12-15 10:58:11 +01:00
Olivier Goffart
15eab07866
OAuth2: Store 'Account::davUser' in the config, and use that user for connecting
...
We need to use the user id to check if we are connected to the right account.
These might be different from the HTTP Basic Auth login. (LDAP setups)
When the account was configured as an oauth2 account form the wisard, the
http_user was already set correctly to the user id. But when the server is
upgrading from basic auth to oauth2, we need to pick the right login.
Note that Account::davUser() already defaults to the HTTP user when none
is set, so this means the upgrade will be fine if this is not set in the
config.
Issues:
https://github.com/owncloud/oauth2/issues/109
https://github.com/owncloud/enterprise/issues/2781
2020-12-15 10:58:11 +01:00
Olivier Goffart
75f66ddaa1
Local discovery: always recurse within touched directory
...
If the file system watcher tells us a directory was modified, we should
recurse into it because it means it is probably a new directory
Issue #6804
2020-12-15 10:58:11 +01:00
Christian Kamm
e10e953c66
PropagateUpload: Avoid crash due to cascading aborts
...
https://sentry.io/owncloud/desktop-win-and-mac/issues/698694072/activity/
2020-12-15 10:58:11 +01:00
Christian Kamm
d1aedcfd3c
Discovery: restructure processFileAnalyzeLocalInfo
2020-12-15 10:58:10 +01:00
Christian Kamm
a2839bd40a
Discovery: easy conditions first in processFileAnalyzeRemoteInfo
...
Removing two levels of indent that way
2020-12-15 10:58:10 +01:00
Christian Kamm
76341904e9
Discovery: Add comments
2020-12-15 10:58:10 +01:00
Olivier Goffart
5a1c93d0ac
Discovery: make sure finished is not called twice, even in case of errors
2020-12-15 10:58:10 +01:00
Olivier Goffart
b86e1efc9a
Remove the backup deteciton code which was used for server < 9.1
2020-12-15 10:58:10 +01:00
Olivier Goffart
f666511a4b
Discovery: Remove stale DB entries
...
And test the Remove/Remove case.
This means we need to always query the database for all the entries.
This showed another small bug in the test in which sync item for virtual
files at the root could have a slash in front of them.
2020-12-15 10:58:10 +01:00
Christian Kamm
5683278fab
Discovery: Comments and visibility adjustments
2020-12-15 10:58:09 +01:00
Olivier Goffart
aa18e10ff5
Discovery: cleanups and comments
2020-12-15 10:58:09 +01:00
Olivier Goffart
b10b3e5eeb
Discovery: move checkMovePermissions to its own function
2020-12-15 10:58:09 +01:00
Olivier Goffart
edd866b32b
Discovery: Adjust the instruction in case of resolved conflict
...
When resolving a conflict because the file was just updated on the server,
we write all the metadata on the database immediatly, so INSTRUCITON_NONE
is enough and UPDATE_METADATA is not needed
2020-12-15 10:58:09 +01:00
Olivier Goffart
7cddaf82ab
ProcessDirectoryJob: always set _childModified to true, regardless the direction
...
This was like that to handle the case of CSYNC_INSTRUCTION_TYPE_CHANGE, but just add
a condition in this location.
2020-12-15 10:58:09 +01:00
Olivier Goffart
46510c2f39
Discovery phase: refactor some code in DiscoveryPhase::findAndCancelDeletedJob
...
Less code duplication
2020-12-15 10:58:09 +01:00
Olivier Goffart
1c2a3279bb
New Discovery Algorithm: more cleanups
...
- rename progress() to be more explicit
- Make some more member of the discovery phase private
2020-12-15 10:58:09 +01:00
Olivier Goffart
2f8c77c54f
Fixup commit 835c9163374f42003aa2f7795ade3f4ff62c8877
...
The previous code considered the also HTTP 207 code without the
application/xml header to have this message.
httpCode 0 does not make much sense anyway.
This change the behavior to consider any 2xx without the xml header
to show this error message
2020-12-15 10:58:08 +01:00
Olivier Goffart
c009dae1ce
New discovery algorithm: fixups
...
Adapt reviews from ckamm in https://github.com/owncloud/client/pull/6738#pullrequestreview-164623532
- SyncJournalFileRecord: initialize everything inline
- Add more comments
- And some ENFORCE
2020-12-15 10:58:08 +01:00
Olivier Goffart
059f722b3b
Move Result to its own header
2020-12-15 10:58:08 +01:00
Olivier Goffart
afed46afcc
New discovery algorithm: Parallel PROPFIND
2020-12-15 10:58:08 +01:00
Olivier Goffart
c8eff3da2d
New Discovery algorithm: Remove the sync cleanup phase
...
Since we do not recurse within some directories, many files are not seen.
The stale entry will cleanup by themself as the sync engine try to remove
the files that are already removed.
Should we need to actually do this cleanup, it should be dotected in the
discovery.
2020-12-15 10:58:08 +01:00
Olivier Goffart
35c0cf4e59
New discovery algorithm: Set the originalFile for ignored files
...
This is used to show the name in the UI
2020-12-15 10:58:08 +01:00
Olivier Goffart
52dcfcb166
New Propagation algorithm: Fetch, and emit, the root etag
...
Remove the feature to concatenate etags as servers that don't
have a root etag are no longer suported
2020-12-15 10:58:07 +01:00
Olivier Goffart
d25d87e92c
New Discovery Algorithm: Ge tthe size of new folders
...
Also add a test that this works properly
2020-12-15 10:58:07 +01:00
Olivier Goffart
ef542ac83d
New Discovery algorithm: Split the process function even further
...
Move the finialization in its own function.
This allow to save a bit of code duplication.
Also change the order of the parameter in the constructor for consistency
2020-12-15 10:58:07 +01:00
Olivier Goffart
fc69dda246
New Discovery Algo: Refactor by splitting the processFile in two
2020-12-15 10:58:07 +01:00
Olivier Goffart
b7d827d6d0
New Discovery Algorithm: Handle rename of virtual files
2020-12-15 10:58:07 +01:00
Christian Kamm
e58a25d7c5
Virtual files: Renames propagate #6718
2020-12-15 10:58:07 +01:00
Olivier Goffart
3289675b8d
Folder Wizard: Disable the 'choose what to sync' treeview if virtual files are selected
...
Don't allow to configure virtual files with a selective sync blacklist
2020-12-15 10:58:07 +01:00
Olivier Goffart
d8fa8e270f
AccountSetting: Fix Small Memoy leak
2020-12-15 10:58:06 +01:00
Olivier Goffart
0ba9dc7dd1
AccountSettings: Force sync should wipe the blacklist
...
Issue #6757
2020-12-15 10:58:06 +01:00
Olivier Goffart
68ace415d4
Virtual files: don't check for new big folders
...
https://github.com/owncloud/client/issues/6724#issuecomment-417368475
2020-12-15 10:58:06 +01:00
Olivier Goffart
75a57778d9
Virtual files: Don't show selective sync
...
Issue #6724
2020-12-15 10:58:06 +01:00
Olivier Goffart
46aa8fd1f8
Socket API: add an option to replace existing files with virtual files
...
Issue #6726
2020-12-15 10:58:06 +01:00
Olivier Goffart
afc953b649
Update the minimum supported version
...
We want to warn if the server version is not supported and did not get
appropriate QA for this client version.
https://github.com/owncloud/enterprise/issues/2687
2020-12-15 10:58:05 +01:00
Markus Goetz
811ac50c05
CMakeLists.txt: Log the Qt version in compile
2020-12-15 10:58:05 +01:00
Christian Kamm
6b571b609c
Conflicts: Rename BasePath to InitialBasePath #6709
2020-12-15 10:58:05 +01:00
Olivier Goffart
d81ccbb0c1
Checksum: Add support for SHA256 and SHA3
...
In case, some day, the server also supports it
2020-12-15 10:58:05 +01:00
Olivier Goffart
bf6e4174c8
Move the checksum related routine from FileSystem to checksum, where they belong
2020-12-15 10:58:05 +01:00
Olivier Goffart
198b65e9fc
Fix a compilation error on windows
2020-12-15 10:58:05 +01:00
Olivier Goffart
21fe54fb13
New Discovery Algo: readability improvements
...
As proposed by ckamm on #6738
2020-12-15 10:58:04 +01:00
Olivier Goffart
3a06a7978f
New discovery algo: data finger print
2020-12-15 10:58:04 +01:00
Olivier Goffart
5683f1c33d
New Disco Algo: Handle spurious virtual files
...
Port commit 0b9049e6ff
for issue #6718
2020-12-15 10:58:04 +01:00
Olivier Goffart
c3f745fa76
Conflict handling: add the OC-ConflictBasePath header
...
Issue #6702
2020-12-15 10:58:04 +01:00
Olivier Goffart
358aadfb98
Account Settings: Add a text for folder using vierual files
...
Issue #6723
2020-12-15 10:58:04 +01:00
Olivier Goffart
73d933115a
Virtual Files: Set the mtime of the virtual file to that of the server
...
Note: When the server mtime is modified, the mtime of the file is not updated
Issue #6727
2020-12-15 10:58:04 +01:00
Olivier Goffart
a17a2a9c06
Virtual Files Mime Type: use "vnd." prefix instead of "x-"
...
As reported in https://github.com/owncloud/client/issues/6717#issuecomment-413703567
2020-12-15 10:58:03 +01:00
Christian Kamm
c10f103fb8
Virtual files: Renaming to virtual doesn't delete data #6718
...
Unfortunately to do this, the local update phase must write to the
database, creating a new side-effect and order dependency (local update
must run before remote update).
2020-12-15 10:58:03 +01:00
Christian Kamm
be0fa72fcb
RemotePermissions: Fix empty vs null
...
Fixes two bugs that appeared since the introduction of the struct:
- when reading permissions from the journal, null ("") was read as
empty-not-null
- when reading permissinos from the server, empty ("") was read as null
Addresses #4608
2020-12-15 10:58:03 +01:00
Olivier Goffart
4837bc8d60
FolderStatusModel: Do not abort applying selective sync if one folder has an error
...
Issue #6675
2020-12-15 10:58:03 +01:00
Olivier Goffart
732069aaa7
SyncEngine: Fix the "direction" of the "all file delted" message when the server is reset
...
Using the direction of the "first" item is not enough as it might be a directory
which is a UPDATE_META_DATA, or there can have been a few changes locally as well.
As reported on https://github.com/owncloud/client/issues/6317#issuecomment-412163113
2020-12-15 10:58:02 +01:00
Christian Kamm
f6ca649308
Do not require server replies to contain an mtime
...
The check was added for #6317 in commit
13eb64584f
.
We did see missing mtimes in replies in tests with live servers though.
Possibly those were old incomplete responses cached in the stat cache?
2020-12-15 10:58:02 +01:00
Olivier Goffart
9401273daf
New discovery algorithm: Call FolderDiscovered
2020-12-15 10:58:02 +01:00
Olivier Goffart
a36ed56f01
New Discovery algorithm: Refactor a bit the way the signal are emited
2020-12-15 10:58:02 +01:00
Olivier Goffart
8f3ce6e520
Fix TestDownload: _ignore_hidden_files was not properly initialized
2020-12-15 10:58:02 +01:00
Olivier Goffart
b6487181c6
New Discovery Phase: fix a few FIXME
...
Some FIXME were already fixed.
2020-12-15 10:58:02 +01:00
Olivier Goffart
9863500ec1
New discovery algorithm: handle symlinks
2020-12-15 10:58:01 +01:00
Olivier Goffart
a9ec521bf1
New discovery algo: Handle Database error
2020-12-15 10:58:01 +01:00
Olivier Goffart
1bcbcd407c
New discovery phase: read the direct download URL and Cookie
2020-12-15 10:58:01 +01:00
Olivier Goffart
ca32eb1cf7
More cleanup of csync remains
2020-12-15 10:58:01 +01:00
Olivier Goffart
ac24cdbde6
New Discovery Algo: Permsission check
2020-12-15 10:58:01 +01:00
Olivier Goffart
0a6d2d0f46
Remove csync_update and csync_reconcile
...
I guess some other csync utilities can also be remove dnow but
that will be for later
2020-12-15 10:58:00 +01:00
Olivier Goffart
57068b0fd9
New Discovery Algorithm: handle server errors
2020-12-15 10:58:00 +01:00
Olivier Goffart
4031fb6d5b
Backport 64014dd374
2020-12-15 10:58:00 +01:00
Olivier Goffart
75a1f2d089
Convert p7.pl to a C++ test
...
This is just a translation of test/scripts/txpl/t7.pl to C++ using the test
framework.
2020-12-15 10:58:00 +01:00
Olivier Goffart
f4a5167812
New Discovery Algo: Support the DatabaseAndFilesystem mode for local discovery
2020-12-15 10:57:59 +01:00
Olivier Goffart
370923791d
New Disco algortihm: Fix TestChunkingNG::connectionDroppedBeforeEtagRecieved
...
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-12-15 10:57:59 +01:00
Olivier Goffart
710934bdbd
New disco algo: Fix TestSyncFileStatusTracker
2020-12-15 10:57:59 +01:00
Olivier Goffart
f926248937
New discovery algorithm: More work on virtual files
2020-12-15 10:57:59 +01:00
Olivier Goffart
35e40b58ca
New Disco algorithm: Type change (file to dir)
2020-12-15 10:57:59 +01:00
Olivier Goffart
1e8c37d3d6
New discovery algorithm: Virtual files
...
The commented tests lines were implementation details
2020-12-15 10:57:59 +01:00
Olivier Goffart
22d989e272
New discovery algorithm: Fix directory deletion
...
TestAllFilesDeleted passes
2020-12-15 10:57:59 +01:00
Olivier Goffart
d54e00488a
New Discovery algorithm
...
Some error handling. In particular for the case where there is a conflict
between files and directories.
SyncEngineTest and SyncMoveTest passes
2020-12-15 10:57:58 +01:00
Olivier Goffart
a384a2d1cb
New Discovery algorithm: Handle of move within a moved directory
2020-12-15 10:57:58 +01:00
Olivier Goffart
bdd1e72dda
New discovery algoritmh: more on Renames
2020-12-15 10:57:58 +01:00
Olivier Goffart
f43d07dc05
New Discovery algorithm: Check that the original file is still on the server while renaming
2020-12-15 10:57:58 +01:00
Olivier Goffart
7e36cc3fcb
New disco algorithm: Fix some moving
...
Fix TestSyncMove::testSelectiveSyncMovedFolder
2020-12-15 10:57:58 +01:00
Olivier Goffart
5a57a36729
New discovery algorithm: Local rename
2020-12-15 10:57:58 +01:00
Olivier Goffart
f9a9be59e6
New discovery algo: Remote move
...
TestSyncMove::testRemoteChangeInMovedFolder
2020-12-15 10:57:57 +01:00
Olivier Goffart
92ddc60900
Handle Encoding Problems
...
TestSyncEngine now passes
2020-12-15 10:57:57 +01:00
Olivier Goffart
501da58b10
Ignore Hidden Files
2020-12-15 10:57:57 +01:00
Olivier Goffart
8bf69cf0cd
Port the invalid napme regexp
...
TestSyncEngine::testInvalidFilenameRegex
2020-12-15 10:57:57 +01:00
Olivier Goffart
9efd21d70b
More progress
...
TestSyncEngine::testFakeConflict / TestSyncEngine::testSyncFileItemProperties
2020-12-15 10:57:57 +01:00