1
0
Fork 0
Commit Graph

216 Commits

Author SHA1 Message Date
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 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 e934f6b27b
New discovery algo
Make TestSyncEngine::testSelectiveSyncBug pass
2020-12-15 10:57:57 +01:00
Olivier Goffart 4066c1a004
New discovery: TestSyncEngine::testEmlLocalChecksum 2020-12-15 10:57:57 +01:00
Olivier Goffart ec681ab2a5
New discovery algorithm: Initial work.
SyncEngineTest testFileDownload is passing
2020-12-15 10:57:56 +01:00
Dominik Schmidt 07f331717f
Rename ocsync library to ${APPLICATION_EXECUTABLE}_csync 2020-12-15 10:57:56 +01:00
Dominik Schmidt aad928a6be
Install libocsync to lib/ without subfolder.
Installing to lib/${APPLICATION_EXECUTABLE} has caused a bunch of
irritations in the past and subtle annoying to fix bugs. To avoid name
clashes with branded clients ${APPLICATION_EXECUTABLE} becomes now
part of the filename instead of the subfolder.

The concrete motivation to change this now is that on Windows there
is no RPATH and it's not possible to run owncloud directly from the
Craft Root folder, which is nice when you're developing on Windows.

It would have been possible to change this just for Windows but as
written earlier this has caused lots of issues and thus I think it's
a good idea to just stay consistent accross platforms when touching it.
2020-12-15 10:57:56 +01:00
Olivier Goffart cf3846c565
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==
```
2020-12-15 10:57:55 +01:00
Christian Kamm a6c19572a2
Virtual files: Only remove virtual file once on download
With thanks to @ogoffart for spotting the problem.
2020-12-15 10:57:54 +01:00
Christian Kamm aa6f5f59c4
Rename Placeholders to Virtual Files in code #6531 2020-12-15 10:57:53 +01:00
Christian Kamm 4e3f2f755a
Placeholder: Stop adding ignore pattern
Because we can't make older clients preserve the version directive that
was attached to it.

See #6504 and #6498
2020-12-15 10:57:52 +01:00
Christian Kamm 6a37a7a42c
Placeholders: Fix migration issues
Some edgecases weren't covered and didn't have tests yet.
2020-12-15 10:57:49 +01:00
Christian Kamm 12d6f680f2
Placeholders: Ignore placeholder files in older clients
To do this, we add the placeholder extension to the user exclude file
automatically. However, newer clients shouldn't use that exclude
pattern: so we also add version directives that allow making exclude
patterns dependent on the client version.
2020-12-15 10:57:49 +01:00
Olivier Goffart 91f53521ae
Placeholder: The extension is now a branding option 2020-12-15 10:57:49 +01:00
Christian Kamm b1de184bc8
Placeholders: Safe migration to older client versions
Now the db entries for placeholders will have the full placeholder
paths. That way older clients will, on remote discovery, delete the
placeholders and download the real files.
2020-12-15 10:57:48 +01:00
Christian Kamm 0cd83a2c09
Placeholders: Deal with conflicts when a placeholder exists
So "foo.owncloud" exists but the user adds a new "foo".
2020-12-15 10:57:48 +01:00
Christian Kamm f5cf03b6a6
On-demand downloading: Placeholder-file based prototype
- Controled by an option.
- New remote files start out as ItemTypePlaceholder, are created with a
  .owncloud extension.
- When their db entry is set to ItemTypePlaceholderDownload the next
  sync run will download them.
- Files that aren't in the placeholder state sync as usual.
- See test cases in testsyncplaceholders.

Missing:
- User ui for triggering placeholder file download
- Maybe: Going back from file to placeholder?
2020-12-15 10:57:43 +01:00
Camila bdd3465e7b
Check if there are patterns associated with a sync exclude file.
The previous check didn't take into the account that .sync-exclude.lst
might be empty which would crash at Q_ASSERT(_allExcludes.contains(basePath))
in the prepare function. It also takes into account that
_allExcludes[basePath] was creating new items in the list.

Signed-off-by: Camila <hello@camila.codes>
2020-11-26 12:12:04 +01:00
Camila 998e93ac13
Add last / to exclude list file path.
This Q_ASSERT(this->endsWith('/')) in BasePathByteArray was the reason
for bug report #1458.

Signed-off-by: Camila <hello@camila.codes>
2020-11-26 12:11:57 +01:00
Kevin Ottens 5cec1373ad Enable bugprone-macro-parentheses clang-tidy check
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-09-01 06:37:03 +00:00
Kevin Ottens c8ea848596 Enable the bugprone-branch-clone clang-tidy check
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-09-01 06:37:03 +00:00
Olivier Goffart a7847a4e82
Upload: Store the size in the UploadInfo, and compare it when resolving potential conflict
This is about the conflicts that happens when the file has been uploaded
correctly to the server, but the etag was not recieved because the connection
was closed before we got the reply.

We used to compare only the mtime when comparing the uploaded file and the
existing file.  However, to be perfectly correct, we also should check the
size.

This was found because TestChunkingNG::connectionDroppedBeforeEtagRecieved is
flaky. Example of faillure found in https://drone.owncloud.com/owncloud/client/481/5
while testing PR #6626

(very trimmed log:)

06-29 07:58:02:015 [ info sync.csync.csync ]:	## Starting local discovery ##
06-29 07:58:02:016 [ info sync.csync.updater ]:	Database entry found, compare: 1530259082 <-> 1530259051, etag:  <-> 1644a8c8750, inode: 1935629 <-> 1935629, size: 301 <-> 300, perms: 0 <-> ff, type: 0 <-> 0, checksum:  <-> SHA1:cc9adedebe27a6259efb8d6ed09f4f2eff559ad1, ignore: 0
06-29 07:58:02:016 [ info sync.csync.updater ]:	file: A/a0, instruction: INSTRUCTION_EVAL <<=
06-29 07:58:02:972 [ warning sync.networkjob ]:	QNetworkReply::NetworkError(OperationCanceledError) "Connection timed out" QVariant(Invalid)
.. next sync...
06-29 07:58:02:980 [ info sync.engine ]:	#### Discovery start ####################################################
06-29 07:58:02:981 [ info sync.csync.csync ]:	## Starting local discovery ##
06-29 07:58:02:983 [ info sync.csync.updater ]:	Database entry found, compare: 1530259082 <-> 1530259051, etag:  <-> 1644a8c8750, inode: 1935629 <-> 1935629, size: 302 <-> 300, perms: 0 <-> ff, type: 0 <-> 0, checksum:  <-> SHA1:cc9adedebe27a6259efb8d6ed09f4f2eff559ad1, ignore: 0
06-29 07:58:02:983 [ info sync.csync.updater ]:	file: A/a0, instruction: INSTRUCTION_EVAL <<=
06-29 07:58:02:985 [ info sync.csync.csync ]:	## Starting remote discovery ##
06-29 07:58:02:985 [ info sync.networkjob ]:	OCC::LsColJob created for "http://localhost/owncloud" + "" "OCC::DiscoverySingleDirectoryJob"
06-29 07:58:02:987 [ info sync.csync.updater ]:	Database entry found, compare: 1530259082 <-> 1530259051, etag: 1644a8c8b26 <-> 1644a8c8750, inode: 0 <-> 1935629, size: 301 <-> 300, perms: ff <-> ff, type: 0 <-> 0, checksum: SHA1:5adcdac9608ae0811247f07f4cf1ab0a2ef99154 <-> SHA1:cc9adedebe27a6259efb8d6ed09f4f2eff559ad1, ignore: 0
06-29 07:58:02:987 [ info sync.csync.updater ]:	file: A/a0, instruction: INSTRUCTION_EVAL <<=
06-29 07:58:02:989 [ info sync.csync.csync ]:	Update detection for remote replica took 0.004 seconds walking 13 files
06-29 07:58:02:990 [ info sync.engine ]:	#### Discovery end ####################################################  9 ms
06-29 07:58:02:990 [ info sync.database ]:	Updating file record for path: "A/a0" inode: 1935629 modtime: 1530259082 type: 0 etag: "1644a8c8b26" fileId: "16383ea4" remotePerm: "WDNVCKR" fileSize: 301 checksum: "SHA1:cc9adedebe27a6259efb8d6ed09f4f2eff559ad1"
06-29 07:58:02:990 [ info sync.csync.reconciler ]:	INSTRUCTION_UPDATE_METADATA    client file: A/a0
06-29 07:58:02:990 [ info sync.csync.csync ]:	Reconciliation for local replica took  0 seconds visiting  13  files.
06-29 07:58:02:990 [ info sync.csync.reconciler ]:	INSTRUCTION_UPDATE_METADATA    server dir:  A
06-29 07:58:02:990 [ info sync.csync.csync ]:	Reconciliation for remote replica took  0 seconds visiting  13  files.
06-29 07:58:02:990 [ info sync.engine ]:	#### Reconcile end ####################################################  9 ms
06-29 07:58:02:990 [ info sync.database ]:	Updating local metadata for: "A/a0" 1530259082 302 1935629
FAIL!  : TestChunkingNG::connectionDroppedBeforeEtagRecieved(small file) '!fakeFolder.syncOnce()' returned FALSE. ()
2020-08-13 16:46:08 +02:00
Kevin Ottens 0e2af4b502 Enable the modernize-deprecated-headers check on clang-tidy
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-08-13 14:53:52 +02:00
Kevin Ottens 6ae1d0ddf6
Get rid of useless using constructs
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-08-12 18:18:57 +02:00
Kevin Ottens d58ec4bf70
Enable the modernize-use-using check on clang-tidy
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-08-12 18:18:57 +02:00
Stephan Beyer a87b6157ee Make csync_file_stat_s::isE2eEncrypted a bitfield
This is in line with other bools of that struct and gets rid
of clang-tidy's modernize-use-default-member-init warning.
(The trivial alternative to get rid of that warning would be
to use default member init for that bool variable, but I think
it is better to have it as a bitfield.)

Signed-off-by: Stephan Beyer <s-beyer@gmx.net>
2020-07-08 14:08:41 +02:00
Kevin Ottens d217fc272e Make sure moves involving e2e are delete + upload
If the file has a mangled name or will end up in a parent directory
known to be encrypted, we stick to the CSYNC_INTRUCTION_NEW instead of
going for CSYNC_INSTRUCTION_RENAME. This way we'll have a delete and an
upload instead of a move command.

Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-07-06 05:27:14 +00:00
Kevin Ottens 7bb48a76c4 Add isE2eEncrypted column in the metadata table
This will allow to exploit the information of a directory being
encrypted or not during the discovery phase.

Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-07-06 05:27:14 +00:00
Kevin Ottens 53c31f5fed Make sure all our logging categories start with nextcloud.
Otherwise it was a bit confusing and annoying for filter rules:
e.g. "nextcloud.sync.*" vs "sync.*".

Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-07-01 15:39:52 +02:00
Michael Schuster 456c1eadbe
Simplify nullptr comparisons where appropriate
Make the codebase consistent, we already have a lot of implicit pointer comparisons.

Exception: Stay explicit on return's, example:
  return _db != nullptr;

Signed-off-by: Michael Schuster <michael@schuster.ms>
2020-06-11 00:27:30 +02:00
Stephan Beyer ea16804751 Replace NULL by nullptr in all C++ files
We keep NULL in the pure C files in src/csync/std and test/csync.

We also replace Doxygen documentation referring to "NULL" to
"\c nullptr" (formatted as code).

Signed-off-by: Stephan Beyer <s-beyer@gmx.net>
2020-06-08 20:07:50 +02:00
Kevin Ottens e3e262e42e Use default member init when applicable
This also fixes a couple of warnings at places (out of order init for
instance) and a potential bug in the webflow credentials / qtkeychain
integration.

Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-06-03 16:10:39 +02:00
Camila San 3bae570f29 Do not declare local variables without an initial value.
Signed-off-by: Camila San <hello@camila.codes>
2020-06-03 07:50:40 +00:00
Kevin Ottens 08cc4e1967 Remove the last redundant void arg I left behind
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-05-28 18:57:20 +02:00
Michael Schuster 044a4bf6b5
Merge pull request #2021 from nextcloud/use_default_for_trivial_ctor_and_dtor
Use = default for trivial ctors and dtors
2020-05-27 05:17:24 +02:00
Michael Schuster b2b0e8f4e4
Merge pull request #2020 from nextcloud/use_make_unique
Use make_unique when appropriate
2020-05-27 05:10:41 +02:00
Kevin Ottens a73a1f3927 Use = default for trivial ctors and dtors
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-05-25 21:33:24 +02:00
Kevin Ottens 9e20a0fecf Use make_unique when appropriate
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-05-25 21:08:43 +02:00
Kevin Ottens 65e6c445e5 Remove redundant void argument list
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-05-25 20:32:55 +02:00
Kevin Ottens 5543e4d834 Don't use int literals for bools
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-05-20 13:52:58 +02:00
Kevin Ottens dea6ebaa35 Use nullptr when appropriate
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-05-20 02:21:26 +02:00
Nicolas Fella 1afda2b875 Fix container detaching
Found by clazy

Signed-off-by: Nicolas Fella <nicolas.fella@gmx.de>
2020-03-21 01:24:37 +01:00
Camila Ayres 6c56811636
Merge branch 'master' into testSyncFileStatusTracker-winPath 2019-10-17 13:37:01 +02:00
Dominique Fuchs 7750d2198d Don't need a second if for non-Windows, using Qt macro for platform check
Signed-off-by: Dominique Fuchs <32204802+DominiqueFuchs@users.noreply.github.com>
2019-10-08 08:44:08 +02:00
Dominique Fuchs f993e7c555 Fixed typo preventing successful path rename on Win and modified ASSERT for Window path styles
Signed-off-by: Dominique Fuchs <32204802+DominiqueFuchs@users.noreply.github.com>
2019-10-08 08:31:31 +02:00
asapelkin 17f39bd09d little loops optimization
Signed-off-by: asapelkin <asapelkin0x01@ya.ru>
2019-10-07 01:29:55 +03:00
Camila San 481d8d3a0b
Checks if exclude file is empty before creating the regular expressions.
The default file created by the application it is not empty.

Signed-off-by: Camila San <hello@camila.codes>
2019-09-30 20:38:56 +02:00
Dominique Fuchs d6af025a46 Numoerous safe conversions implemented. Added additional Utility::convertSizeToDWORD for windows builds.
Signed-off-by: Dominique Fuchs <32204802+DominiqueFuchs@users.noreply.github.com>
2019-09-08 11:33:20 +02:00
Dominique Fuchs 82fa10c227 Corrected namespace when calling convertSizetoUint
Signed-off-by: Dominique Fuchs <32204802+DominiqueFuchs@users.noreply.github.com>
2019-09-08 10:21:59 +02:00
Dominique Fuchs 46e0a05078 Renamed conversion function to make intention more clear. Also defaulted to 'controlled truncation' to not stupidly crash. TBD/TODO: Better handling for such things.
Signed-off-by: Dominique Fuchs <32204802+DominiqueFuchs@users.noreply.github.com>
2019-09-08 02:20:24 +02:00
Samir Benmendil 5e3c2d2a96 Fix fullPath matching
Signed-off-by: Samir Benmendil <me@rmz.io>
2019-08-15 03:00:26 +01:00
Samir Benmendil 7a9b13a563 Manual exclude are anchored to _localPath by default
This makes a lot of sense, since there should be no file to be synced
outside of _localPath.

Signed-off-by: Samir Benmendil <me@rmz.io>
2019-08-15 03:00:26 +01:00
Samir Benmendil e27645cb00 Extract loadExcludeFile and use it when discovering new exclude files
Signed-off-by: Samir Benmendil <me@rmz.io>
2019-08-15 03:00:26 +01:00
Samir Benmendil 34fcb13e78 Never ignore .sync-exclude, even if excludeHidden
That is unless any of the parent folders is hidden.

Signed-off-by: Samir Benmendil <me@rmz.io>
2019-08-15 03:00:26 +01:00
Samir Benmendil 14279104ae Read .sync_exclude.lst in each subdirectory
Signed-off-by: Samir Benmendil <me@rmz.io>
2019-08-15 03:00:26 +01:00
Roeland Jago Douma b7d0e5672a
Merge branch 'master' into upstream/pr/6616 2018-10-31 13:51:34 +01:00
Roeland Jago Douma eb31e9205c
Merge branch 'master' into upstream/issues/6696-6610 2018-10-24 16:50:39 +02:00
Roeland Jago Douma 6b7328bb87
Merge branch 'master' into upstream/pr/6632 2018-10-23 22:48:34 +02:00
Roeland Jago Douma 9d9f96a685
Merge branch 'master' into upstream/pr/6615 2018-10-19 15:43:50 +02:00
kevin147147 e214234001
Rename README to README.md
Preview :)
2018-10-08 21:01:08 +02:00
kevin147147 54e58b51ab
Rename INSTALL to INSTALL.md
Preview :)
2018-10-08 20:57:34 +02:00
Markus Goetz 4f83bba829
Windows: Don't ignore files with FILE_ATTRIBUTE_TEMPORARY
Too many applications incorrectly use this attribute.

For #6696 #6610
2018-09-10 20:20:40 +02:00
Christian Kamm 3ec4fc6145
Update: Report on readdir() errors #6610 2018-09-10 14:33:36 +02:00
Olivier Goffart d202942a2c
Reconcile: When detecting a local move, keep the local mtime
https://github.com/owncloud/client/issues/6629#issuecomment-402450691
2018-09-09 21:38:10 +02:00
Christian Kamm 283c4b13a1
Log: Adjust update/reconcile log verbosity
Not having these enabled by default is causing significant extra back
and forth with reporters since they must manually use --logdebug for the
log to be useful.
2018-09-09 21:34:41 +02:00
Roeland Jago Douma a0c458d937
Fix output add E2E again
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2018-06-05 09:02:41 +02:00
Olivier Goffart 3e508329b5
csync_update: add the checksum in the discovery log
Issue #6414
2018-06-05 07:52:29 +02:00
Roeland Jago Douma c1171d700e
Merge pull request #322 from nextcloud/upstream/pr/6404
Excludes: Expand doc, Desktop.ini only in root folder
2018-06-04 17:13:23 +02:00
Olivier Goffart 5f30177bfc
CSync: Remove unused error codes
None of the removed ERRNO code were ever set.
So none of the removed error hapenned anymore
2018-06-04 15:41:38 +02:00
Olivier Goffart 15e93c8a31
CSync: reconcile never returns an error 2018-06-04 15:41:38 +02:00
Olivier Goffart be29fc2f69
csync: remove CSYNC_PARAM_ERROR
It does not make sense to report such error to the user.
Its goal was to show invalid use of the csync API, but this is now done
with asserts.
2018-06-04 15:41:38 +02:00
Olivier Goffart 0443f8dd4d
csync: Simplify csync_walk_local_tree/csync_walk_remote_tree
Small refactoring
2018-06-04 15:41:38 +02:00
Roeland Jago Douma 1262cbf4ef
Merge pull request #314 from nextcloud/upstream/pr/6373
Make sure ignored and conflict files show up in the issues tab even with partial local discovery
2018-06-02 20:20:19 +02:00
Christian Kamm 5f7fd7c551
Excludes: Expand doc, Desktop.ini only in root folder
The Desktop.ini exclude was added for 2.4 because we add such a file to
the synced folder on Windows. It doesn't need to cover subdirectories.
2018-05-16 20:29:12 +02:00
Christian Kamm 75194d1821
SyncEngine: Make "local discovery?" question available
Also fix the minor bug that was mentioned and add tests.
2018-05-16 16:46:40 +02:00
Christian Kamm 8077748c9d
slotFolderDiscovered: Fix 'local' always being false
It was unused, so no harm done.
2018-05-16 16:44:36 +02:00
Olivier Goffart b0f539fc1f
cmake: Remove references of now unused WITH_TESTING
Issue #6318
2018-05-16 13:00:17 +02:00
Daniel Nicoletti 16aa54ed64 Do not create new db entries when the remote tree does not have proper values 2018-04-09 13:23:52 +02:00
Daniel Nicoletti d93f7269b8 Properly mark encrypted files for removal 2018-04-09 13:23:52 +02:00
Daniel Nicoletti d3b6aacf3f Fix merging remote and local trees when e2e files are involved
When populating the tree from the filesystem we need to fill
the e2eMangledName from DB and we when trying to find another
match on the oposite tree we need to take in account that names
don't match and search with the mangled name information
2018-04-09 13:23:52 +02:00
Daniel Nicoletti 99117078f3 Remove table for e2e and add an e2eMangledName column (#169)
If the code was not complex enough syncing two tables
already started to give UNIQUE constrains errors on
simple sync operations, this also adds initial support
remote delete of an encrypted file
2018-02-12 12:50:51 +01:00
Tomaz Canabrava d24a1e542e Merge branch 'master' into clientSideEncryptionV3 2018-01-29 14:06:12 +01:00
Tomaz Canabrava f4a50e88f5 [CSE] Ignore renames for downloaded files.
- TODO: Fix the incorrect "filename has been removed" popup.
The file is not removed, just the popup shows.
2018-01-28 23:59:53 +01:00
Tomaz Canabrava d38e5e1529 [CSE] Bypass rename if it's e2e
The client tracks the files in server and locally, but the
names of the files differ in the server, but we do *not*
wanna rename the files to the server one, we wanna
keep it as is if it's an encrypted file.
2018-01-28 23:48:51 +01:00
Christian Kamm c1b5412c16 Exclude regex: Use named captures
My benchmarks show no performance difference.
2018-01-18 10:24:24 +01:00
Christian Kamm 4337e8532e Exclude matching: Speedup the full-path traversal case
Previously we'd use the full regex when the bname triggered a full-path
matching to take place. Now we have a simplified full-traversal regex
for this case that can be significantly faster to apply.

Triggered by #5017 but doesn't actually solve it.
2018-01-17 15:05:50 +01:00
Dominik Schmidt cbf470f17b Fix csync installation on windows 2018-01-13 13:58:17 +01:00
Olivier Goffart 437d45981e Remove unused c_strlist 2018-01-13 13:58:17 +01:00
Olivier Goffart 3ae327ea8e Modernize out CMakeLists.txt
Mainly uses target_include_directories instead of include_directories
so libraries public include directory get automatically added when adding
the target in target_link_library
2018-01-13 13:58:17 +01:00
Olivier Goffart 5d0aa5f039 Remove unused c_path 2018-01-13 13:58:17 +01:00
Olivier Goffart 41798cef18 Csync: remove some unused build system stuff 2018-01-13 13:58:17 +01:00
Olivier Goffart 1c11778693 Remove the unusued csync_file_locked_or_open test in csync_reconcile
It is unused. Also remove the corresponding error code
2018-01-13 13:58:17 +01:00
Olivier Goffart 3ddd4b6f16 Get rid of csync_log
We use Qt's debugging code everywhere
2018-01-13 13:58:17 +01:00
Olivier Goffart d948ed11a1 Csync: use QElapsedTimer and qCInfo instead of CSYNC_LOG and its own csync time function
This allow to remove all the csync time manipulation routne which are now unused
2018-01-13 13:58:17 +01:00
Olivier Goffart 257d8142b1 Build system: Get rid of QtVersionAbstraction.cmake
Use modern cmake with target_link_libraries and Qt5:: that
automatically add the include path and compile flags
2018-01-13 13:58:17 +01:00
Olivier Goffart 48c55b7d29 csync/std: don't build in a separate library
There is no need to create a static library for the csync/std file, just
put everything together in csync
2018-01-13 13:58:17 +01:00
Olivier Goffart 776bbbf7b1 Don't include sqlite3.h from headers
So that sqlite is not part of the public interface of csync
(and that the sqlite include path don't need to be passed when compiling
libsync or gui)
2018-01-13 13:58:17 +01:00