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
dfedb09fd8
Move test for issue #1329 from t1.pl to new test system
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
Olivier Goffart
fad1238b33
Test: Move the test for Utility::normalizeEtag to testutility.cpp
...
I just moved the text and did the minimum to port it to QtTest
Did not change hte layout of it.
Relates #6358
2020-12-15 10:58:28 +01:00
Olivier Goffart
6e048a2d3f
Remove check_csync_util
...
It's testing nothing.
Only that one can convert a csync instruction to a string.
But this is only used in debug anyway
Relates to #6358
2020-12-15 10:58:28 +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
Dominik Schmidt
bd22caa5ec
Remove unused include directories
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