Commit Graph

318 Commits

Author SHA1 Message Date
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
Olivier Goffart
3b0a21028c SyncEngine: Ensure that the paths passed to the discovery ends with slashes
This was making the tx.pl test fail
2018-12-18 11:06:31 +01:00
Olivier Goffart
9fbef38247 Merge remote-tracking branch 'owncloud/vfs-master'
Conflicts:
	src/libsync/filesystem.cpp
	src/libsync/filesystem.h
2018-12-07 10:04:43 +01:00
Olivier Goffart
c3277331eb Merge branch 'readonly-restore-context-6252' into 'master'
Conflicts:
	src/gui/socketapi.cpp
	src/gui/socketapi.h
	src/libsync/syncengine.cpp
2018-12-03 14:18:35 +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
29a52e9600 vfs: Reenable local metadata updating of vfs files 2018-11-26 13:02:48 +01:00
Christian Kamm
06928a4037 winvfs: initial work
Done by ckamm and dschmidt
2018-11-26 12:53:30 +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
69251ed83e Discovery: fix double emission of finished in case of error 2018-11-08 11:22:03 +01:00
Christian Kamm
2a5fbd1913 Discovery: Don't rebuild invalidFilname regex each call 2018-10-19 10:51:25 +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
Olivier Goffart
7daf393c1c Merge remote-tracking branch 'origin/2.5'
Conflicts:
	ChangeLog
2018-10-18 13:05:34 +02:00
Olivier Goffart
20e6ac05e4 Remove the backup deteciton code which was used for server < 9.1 2018-10-16 16:08:49 +02:00
Olivier Goffart
2df0fd936a 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
2018-10-15 18:59:09 +02:00
Olivier Goffart
6cb57cf439 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
2018-10-12 12:10:50 +02:00
Olivier Goffart
d62027db4a 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.
2018-10-09 15:54:42 +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
28f1c95b96 Merge remote-tracking branch 'origin/master' into new_discovery_algo
Conflicts:
	src/csync/csync_reconcile.cpp
	src/csync/csync_update.cpp
	src/libsync/syncengine.cpp
	src/libsync/syncengine.h

Note: csync changes from 5e442f588e
are not included and will be fixed separately
2018-10-04 11:23:19 +02:00
Olivier Goffart
0290564d5c Merge remote-tracking branch 'owncloud/master' into delta-sync
Conflicts:
	.gitmodules
	src/cmd/cmd.cpp
	src/gui/generalsettings.ui
	src/libsync/propagatedownload.cpp
	src/libsync/propagateuploadng.cpp
2018-09-14 15:25:59 +02:00
Christian Kamm
b4f63ca219 Conflicts: Rename BasePath to InitialBasePath #6709 2018-08-22 09:03:54 +02:00
Olivier Goffart
67ee64a769 New discovery algo: data finger print 2018-08-21 19:54:48 +02:00
Olivier Goffart
597c28f316 Merge remote-tracking branch 'master' into new_discovery_algo 2018-08-21 11:22:38 +02:00
Olivier Goffart
c85cd8e225 Conflict handling: add the OC-ConflictBasePath header
Issue #6702
2018-08-19 21:22:08 +02:00
Olivier Goffart
4a3fce531c SyncEngine: Fix renames making hierarchy inversion
Issue #6694
2018-08-16 10:38:18 +02:00
Olivier Goffart
58f46010b5 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
2018-08-15 09:34:19 +02:00
Olivier Goffart
58d6632eaf Data-Fingerprint: Fix backup detection when fingerprint is empty
Add a test to test the data fingerprint feature make me realize it was broken.
The code was relying in the distinction between empty and null QByteArray,
but this was a bad idea as this difference is lost when going through QString.
2018-08-14 10:57:20 +02:00
Olivier Goffart
b6db624198 New discovery algorithm: Call FolderDiscovered 2018-08-06 12:53:51 +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
eb669c997e More cleanup of csync remains 2018-07-26 13:55:02 +02:00
Olivier Goffart
01f35bdbef New Discovery Algo: Permsission check 2018-07-25 18:32:21 +02:00
Olivier Goffart
04da4365f9 Remove csync_update and csync_reconcile
I guess some other csync utilities can also be remove dnow but
that will be for later
2018-07-25 16:00:16 +02:00
Olivier Goffart
09deeaf8a8 Merge remote-tracking branch 'owncloud/master' into new_discovery_algo
Conflicts:
	src/csync/csync_reconcile.cpp
	src/csync/csync_update.cpp
2018-07-25 14:06:14 +02:00
Olivier Goffart
a0675bd0ab Convert p7.pl to a C++ test
This is just a translation of test/scripts/txpl/t7.pl to C++ using the test
framework.
2018-07-25 13:48:58 +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
cb6b950c60 New disco algo: Fix TestSyncFileStatusTracker 2018-07-18 12:15:13 +02:00
Olivier Goffart
8462feb8bf New Disco algorithm: Type change (file to dir) 2018-07-17 17:22:08 +02:00
Olivier Goffart
6e6f99923e New discovery algorithm: Fix directory deletion
TestAllFilesDeleted passes
2018-07-17 10:09:57 +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
9cb2973b2a New discovery algo: Remote move
TestSyncMove::testRemoteChangeInMovedFolder
2018-07-11 16:55:47 +02:00
Olivier Goffart
df27bdca41 Handle Encoding Problems
TestSyncEngine now passes
2018-07-10 16:56:54 +02:00
Olivier Goffart
0d1f310815 Ignore Hidden Files 2018-07-10 16:38:36 +02:00
Olivier Goffart
bd504121f4 Port the invalid napme regexp
TestSyncEngine::testInvalidFilenameRegex
2018-07-10 16:38:33 +02:00
Olivier Goffart
9bbd807571 New discovery algo
Make TestSyncEngine::testSelectiveSyncBug pass
2018-07-10 15:05:01 +02:00
Olivier Goffart
1a900bbf57 New discovery algorithm: Initial work.
SyncEngineTest testFileDownload is passing
2018-07-10 14:53:10 +02:00
Olivier Goffart
888f2aae2f csync: refactor csync_s::error_string to avoid valgrind error
The problem here is that we were sometimes allocating the error_string with
qstrdup, which need to be released with delete[] and not free().

Simplify the code by using QString instead.

```
==7230== Mismatched free() / delete / delete []
==7230==    at 0x4C2E10B: free (vg_replace_malloc.c:530)
==7230==    by 0x57C2321: csync_s::reinitialize() (csync.cpp:247)
==7230==    by 0x548130F: OCC::SyncEngine::finalize(bool) (syncengine.cpp:1212)
==7230==    by 0x5481223: OCC::SyncEngine::handleSyncError(csync_s*, char const*) (syncengine.cpp:746)
==7230==    by 0x5483E78: OCC::SyncEngine::slotDiscoveryJobFinished(int) (syncengine.cpp:965)
==7230==    by 0x5495E34: QtPrivate::FunctorCall<QtPrivate::IndexesList<0>, QtPrivate::List<int>, void, void (OCC::SyncEngine::*)(int)>::call(void (OCC::SyncEngine::*)(int), OCC::SyncEngine*, void**) (qobjectdefs_impl.h:134)
==7230==    by 0x5495D92: void QtPrivate::FunctionPointer<void (OCC::SyncEngine::*)(int)>::call<QtPrivate::List<int>, void>(void (OCC::SyncEngine::*)(int), OCC::SyncEngine*, void**) (qobjectdefs_impl.h:167)
==7230==    by 0x5495CB5: QtPrivate::QSlotObject<void (OCC::SyncEngine::*)(int), QtPrivate::List<int>, void>::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void**, bool*) (qobjectdefs_impl.h:396)
==7230==    by 0xA9BF2E1: QObject::event(QEvent*) (in /usr/lib/libQt5Core.so.5.11.0)
==7230==    by 0x64BE983: QApplicationPrivate::notify_helper(QObject*, QEvent*) (in /usr/lib/libQt5Widgets.so.5.11.0)
==7230==    by 0x64C625A: QApplication::notify(QObject*, QEvent*) (in /usr/lib/libQt5Widgets.so.5.11.0)
==7230==    by 0xA994BC8: QCoreApplication::notifyInternal2(QObject*, QEvent*) (in /usr/lib/libQt5Core.so.5.11.0)
==7230==  Address 0x225b2640 is 0 bytes inside a block of size 50 alloc'd
==7230==    at 0x4C2DC6F: operator new[](unsigned long) (vg_replace_malloc.c:423)
==7230==    by 0xA7E8FC8: qstrdup(char const*) (in /usr/lib/libQt5Core.so.5.11.0)
==7230==    by 0x53F5750: OCC::DiscoveryJob::remote_vio_opendir_hook(char const*, void*) (discoveryphase.cpp:666)
==7230==    by 0x57E1278: csync_vio_opendir(csync_s*, char const*) (csync_vio.cpp:39)
==7230==    by 0x57D718F: csync_ftw(csync_s*, char const*, int (*)(csync_s*, std::unique_ptr<csync_file_stat_s, std::default_delete<csync_file_stat_s> >), unsigned int) (csync_update.cpp:674)
==7230==    by 0x57C1B05: csync_update(csync_s*) (csync.cpp:109)
==7230==    by 0x53F5BCC: OCC::DiscoveryJob::start() (discoveryphase.cpp:718)
==7230==    by 0x54B8F74: OCC::DiscoveryJob::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) (moc_discoveryphase.cpp:494)
==7230==    by 0xA9BF2E1: QObject::event(QEvent*) (in /usr/lib/libQt5Core.so.5.11.0)
==7230==    by 0x64BE983: QApplicationPrivate::notify_helper(QObject*, QEvent*) (in /usr/lib/libQt5Widgets.so.5.11.0)
==7230==    by 0x64C625A: QApplication::notify(QObject*, QEvent*) (in /usr/lib/libQt5Widgets.so.5.11.0)
==7230==    by 0xA994BC8: QCoreApplication::notifyInternal2(QObject*, QEvent*) (in /usr/lib/libQt5Core.so.5.11.0)
==7230==
```
2018-06-04 08:57:24 +02:00
Christian Kamm
8cfc16c16c SocketAPI: Introduce conflict resolution actions #6252
For conflicts generally as well as new files in read-only directories
the context menu will now present delete and move options.
2018-05-23 11:02:00 +02:00
Christian Kamm
8f9f2b5462 Rename Placeholders to Virtual Files in code #6531 2018-05-23 09:57:00 +02:00
Christian Kamm
1c4592339a Rename "placeholder" feature 2018-05-16 12:52:32 +02:00