Christian Kamm
010abe4c82
Pin state updates
...
- unspecified and inherited are different
- move enum to header in common/
- access through Vfs instead of directly in Journal
2019-02-11 13:35:14 +01:00
Christian Kamm
02f0e18913
Discovery: Files can have dehydrate/download actions
...
This will be used in conjunction with vfs plugins that detect whether a
file has a pending hydration/dehydration through independent means and
communicate that to the discovery through local file type.
2019-02-11 13:35:14 +01:00
Christian Kamm
e0200fbbd2
Discovery: Add signal for silentlyExcluded files
...
This allows SyncFileStatusTracker to also know about these. After all
its information is used to provide icons for them too.
2019-02-11 13:35:14 +01:00
Olivier Goffart
dfdcd3ff54
Move: Fix move detection in directory move on the other side
2019-01-22 08:14:12 +01:00
Olivier Goffart
303922b80f
Move: add more test and fix move within moves
2019-01-22 08:14:12 +01:00
Christian Kamm
90a8eaa949
vfs suffix: Ignore server files or synced files with the suffix #6953
2019-01-18 11:03:01 +01:00
Christian Kamm
df1723c9b2
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.
2019-01-07 10:09:03 +01:00
Olivier Goffart
3313de9066
Discovery: Handle the blacklistFiles from the server capabilities
...
Issue #434
Ideally one could add the blacklist to the exlucde reggexp, but this
is simpler
2018-12-22 18:19:37 +01:00
Christian Kamm
fac6ad354f
vfs: Use PinState in sync algorithm #6815
...
New files are virtual if the file's pin state is OnlineOnly.
2018-12-19 14:04:24 +01:00
Olivier Goffart
3eabe35520
Discovery: Set right direction when restoring deleted discovery because it has modified files
...
(Catched by a faillure of t1.pl)
2018-12-19 10:54:48 +01:00
Christian Kamm
18ab3f5dcd
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
2018-11-26 13:02:48 +01:00
Christian Kamm
4f56366fd5
vfs: Ensure SyncOptions::_vfs is never null
...
- Create a VfsOff derived class
- Make it a shared pointer shared with Folder::_vfs
2018-11-26 13:02:48 +01:00
Christian Kamm
6cb071da47
Generalize Result<> class, add Optional<>
...
To make it nicer to use outside of HTTP results.
2018-11-26 13:02:48 +01:00
Christian Kamm
f500539c44
vfs: Make some behaviors suffix-vfs specific
2018-11-26 12:59:51 +01:00
Christian Kamm
f6863964ee
vfs: Allow remote renames to propagate as such
2018-11-26 12:59:51 +01:00
Christian Kamm
12e5313d85
vfs: Implement dehydration tagging
2018-11-26 12:59:51 +01:00
Christian Kamm
0c83794227
vfs: Fix suffix detection and handling
2018-11-26 12:59:51 +01:00
Christian Kamm
446a82c00d
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
2018-11-26 12:54:55 +01:00
Olivier Goffart
3b386e0b33
csync_vio_locale: use QString for the path in opendir
...
So we don't have to convert to utf8 and back again
2018-11-15 07:26:44 +01:00
Olivier Goffart
eef3e9086a
Exclude: do everything with QString wiuthout converting to char*
2018-11-15 07:26:44 +01:00
Olivier Goffart
f92cfdb3a3
ProcessDirectoryJob::process: optimize so there is only one map
2018-11-15 07:26:44 +01:00
Olivier Goffart
682cc6f199
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
2018-11-15 07:26:44 +01:00
Olivier Goffart
164993ddf8
Workaround GCC < 7 bug.
...
https://stackoverflow.com/questions/32097759/calling-this-member-function-from-generic-lambda-clang-vs-gcc
2018-11-08 11:22:28 +01:00
Olivier Goffart
69251ed83e
Discovery: fix double emission of finished in case of error
2018-11-08 11:22:03 +01:00
Olivier Goffart
dc63996773
Discovery: Fix downloading files when database is used for local discovery
...
This also fix the currently failling LockedFilesTest
2018-11-07 13:46:54 +01:00
Olivier Goffart
7803ef397e
Discovery: Fix renaming on windows
...
buf.type is ItemFileSkip because csync_vio_local_stat does not set this field
2018-11-02 16:47:56 +01:00
Olivier Goffart
3823aabdbc
New Discovery: Fix trailing slash causing failure on windows
2018-11-01 12:21:36 +01:00
Christian Kamm
874211d0e4
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
2018-10-24 10:50:54 +02:00
Olivier Goffart
d43463e603
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)
2018-10-23 11:14:01 +02:00
Christian Kamm
16a5754cf8
Discovery: Fix log output for instructions
2018-10-19 11:23:50 +02:00
Christian Kamm
2a5fbd1913
Discovery: Don't rebuild invalidFilname regex each call
2018-10-19 10:51:25 +02:00
Christian Kamm
ff7e9af35c
Discovery: Introduce smaller functions
2018-10-19 10:45:11 +02:00
Christian Kamm
d389b37d90
Excludes: drop csyncTraversalMatchFun()
...
The new discovery can call the traversal match function directly.
2018-10-19 10:28:22 +02:00
Olivier Goffart
2e16f654ea
Merge remote-tracking branch 'owncloud/master' into new_discovery_algo
...
Conflicts:
src/csync/csync_update.cpp
test/csync/csync_tests/check_csync_update.cpp
2018-10-18 13:22:29 +02:00
Christian Kamm
e42b0bce4e
Discovery: restructure processFileAnalyzeLocalInfo
2018-10-17 11:29:45 +02:00
Christian Kamm
b9f17aeaf1
Discovery: easy conditions first in processFileAnalyzeRemoteInfo
...
Removing two levels of indent that way
2018-10-17 10:48:15 +02:00
Christian Kamm
43f9d8ac5e
Discovery: Add comments
2018-10-17 10:42:58 +02:00
Olivier Goffart
ab124a76d8
Discovery: make sure finished is not called twice, even in case of errors
2018-10-16 16:18:39 +02:00
Olivier Goffart
24c717c628
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.
2018-10-16 16:00:59 +02:00
Olivier Goffart
5aa8ffd95b
Discovery: cleanups and comments
2018-10-16 15:04:43 +02:00
Olivier Goffart
7f40081d3e
Discovery: move checkMovePermissions to its own function
2018-10-16 15:04:00 +02:00
Olivier Goffart
597360b888
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
2018-10-16 15:03:16 +02:00
Olivier Goffart
7c52537631
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.
2018-10-16 15:03:16 +02:00
Olivier Goffart
4d97480809
Discovery phase: refactor some code in DiscoveryPhase::findAndCancelDeletedJob
...
Less code duplication
2018-10-16 13:03:24 +02:00
Olivier Goffart
a6e58a1ff0
New Discovery Algorithm: more cleanups
...
- rename progress() to be more explicit
- Make some more member of the discovery phase private
2018-10-16 11:04:07 +02:00
Olivier Goffart
84c871c087
New discovery algorithm: Parallel PROPFIND
2018-10-12 14:46:46 +02:00
Olivier Goffart
b646ab6211
New discovery algorithm: Set the originalFile for ignored files
...
This is used to show the name in the UI
2018-10-09 15:54:03 +02:00
Olivier Goffart
442a0e486f
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
2018-10-09 15:12:02 +02:00
Olivier Goffart
d29a05aea5
New Discovery Algorithm: Ge tthe size of new folders
...
Also add a test that this works properly
2018-10-09 14:39:23 +02:00
Olivier Goffart
067d9b34f7
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
2018-10-09 12:51:53 +02:00