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
Olivier Goffart
13bc5bfe2b
New Discovery Algo: Refactor by splitting the processFile in two
2018-10-05 11:06:36 +02:00
Olivier Goffart
7881f1f88e
New Discovery Algorithm: Handle rename of virtual files
2018-10-05 10:13:37 +02:00
Olivier Goffart
7ac5f93e96
New Discovery Algo: readability improvements
...
As proposed by ckamm on #6738
2018-08-27 15:10:12 +02:00
Olivier Goffart
67ee64a769
New discovery algo: data finger print
2018-08-21 19:54:48 +02:00
Olivier Goffart
b37e0aad5a
New Disco Algo: Handle spurious virtual files
...
Port commit 0b9049e6ff
for issue #6718
2018-08-21 13:08:09 +02:00
Olivier Goffart
2e82518516
New Discovery algorithm: Refactor a bit the way the signal are emited
2018-08-06 12:41:59 +02:00
Olivier Goffart
926c27a73d
New Discovery Phase: fix a few FIXME
...
Some FIXME were already fixed.
2018-08-06 11:30:21 +02:00
Olivier Goffart
1e7983cf99
New discovery algorithm: handle symlinks
2018-08-06 11:29:23 +02:00
Olivier Goffart
65e163adf3
New discovery algo: Handle Database error
2018-08-06 11:28:11 +02:00
Olivier Goffart
3d9ab56453
New discovery phase: read the direct download URL and Cookie
2018-07-26 13:55:13 +02:00
Olivier Goffart
01f35bdbef
New Discovery Algo: Permsission check
2018-07-25 18:32:21 +02:00
Olivier Goffart
835c916337
New Discovery Algorithm: handle server errors
2018-07-25 15:24:30 +02:00
Olivier Goffart
7abb0826cf
Backport 64014dd374
2018-07-25 14:08:55 +02:00
Olivier Goffart
0905892835
New Discovery Algo: Support the DatabaseAndFilesystem mode for local discovery
2018-07-18 14:19:36 +02:00
Olivier Goffart
10b8ca640a
New Disco algortihm: Fix TestChunkingNG::connectionDroppedBeforeEtagRecieved
2018-07-18 12:40:22 +02:00
Olivier Goffart
a5cb18435e
New discovery algorithm: More work on virtual files
2018-07-18 11:52:12 +02:00
Olivier Goffart
8462feb8bf
New Disco algorithm: Type change (file to dir)
2018-07-17 17:22:08 +02:00
Olivier Goffart
a299907c59
New discovery algorithm: Virtual files
...
The commented tests lines were implementation details
2018-07-17 13:35:07 +02:00
Olivier Goffart
926c6976f5
New Discovery algorithm
...
Some error handling. In particular for the case where there is a conflict
between files and directories.
SyncEngineTest and SyncMoveTest passes
2018-07-16 18:37:18 +02:00
Olivier Goffart
1df50836ca
New Discovery algorithm: Handle of move within a moved directory
2018-07-16 16:38:24 +02:00
Olivier Goffart
384afe195e
New discovery algoritmh: more on Renames
2018-07-13 17:47:37 +02:00
Olivier Goffart
4e7011e86c
New Discovery algorithm: Check that the original file is still on the server while renaming
2018-07-13 15:34:41 +02:00
Olivier Goffart
acca55d114
New disco algorithm: Fix some moving
...
Fix TestSyncMove::testSelectiveSyncMovedFolder
2018-07-12 11:30:55 +02:00