Commit graph

20 commits

Author SHA1 Message Date
Jocelyn Turcotte
2b274e9460 Fix the MSVC build
- Replace functions that are provided by MinGW with a Win32-based
  implementation
- Explicitly export needed symbols from ocsync.dll
- Rename share.h to sharemanager.h since the name clashes with one
  of the Windows headers and get included from there
- Remove the timestamp from the fallback csync stderr logging, it's
  not used since we always provide a log callback
2016-09-16 17:43:39 +02:00
Christian Kamm
eadecc5802 Excludes: Fix a Windows specific bug #5039
It meant that almost nothing was being excluded.

Broken since 87b4693a9d
2016-07-19 15:38:57 +02:00
Christian Kamm
6d02d76cfd Fix compile warnings in tests 2016-06-07 09:43:04 +02:00
Christian Kamm
d7bd1300a8 Ignores: expand escapes #4568 2016-03-17 14:31:53 +01:00
Jocelyn Turcotte
b8227afcaa Move the csync_context creation in SyncEngine
The creation doesn't need to be separated from the SyncEngine anymore.
This allows the SyncEngine to be created in fewer steps if we want to
use it in tests.

This moves most of the direct csync code from Folder into the SyncEngine.
The exclude file logic for the context has been wrapped using the
existing ExcludedFiles class as well.
2016-02-25 20:53:13 +01:00
Jocelyn Turcotte
b8dee63d7a Remove superfluous error checking from csync_create and csync_init
Given that we control all call sites, the only way that this can fail is during
OOM. Also remove the code in csync itself to make sure that it's obvious that
any new error case wouldn't be handled by call sites.
2016-02-25 20:53:13 +01:00
Klaas Freitag
d89edc35d2 csync-tests: Added some directory wildcard tests.
This was to verify client issue #1558
2016-01-10 12:04:07 +01:00
Christian Kamm
beb970646b Fix csync_exclude test
The exclude file was reorganized in
b6aa18bfbc
2015-11-11 09:42:31 +01:00
Olivier Goffart
71827549d6 csync_exclude: Use PathMatchSpecA instead of PathMatchSpecW
So we avoid lots of memory allocation.
We can work with char* directly since both the pattern and the file
name are in UTF-8 and there is no need to understand unicode for
such pattern.

(In fact, '?' would not match anyore non-ascii characters, but I
don't think that's a problem. I don't think anyone use '?' in its
exclude list. And the two allocations per call to csync_fnmatch are
really worth getting rid of)
2015-10-20 18:38:47 +02:00
Christian Kamm
07ca0be3c5 csync_excluded: Another speedup #3638
Build a list of path components outside of the exclude pattern loop.
2015-08-24 15:08:06 +02:00
Christian Kamm
fe49255bff csync_excluded: Add fast _traversal() function #3638
This function only checks the full path and the basename and is thus
around 7x faster. It is very useful in a csync_update context where
we know that the leading dirs have already been checked for exclusion.
2015-08-24 15:08:06 +02:00
Christian Kamm
20f4ec6b67 csync_exclude: Speed up siginificantly #3638
The performance test indicates a speedup of around 3x for paths
with around 12 components.
2015-08-24 15:08:06 +02:00
Daniel Molkentin
d76192cce1 Ignore reserved words on Windows
Fixes #2385 and #2386
2014-10-24 13:18:57 -04:00
Klaas Freitag
fc36e7eccf tests: Add a csync exclude test to check toplevel excludes. 2014-09-18 15:34:24 +02:00
Klaas Freitag
e06e5fe55f Excludes: Fix unit tests for the new exclude load interface.
Also removed some commented lines.
2014-08-21 13:12:05 +02:00
Markus Goetz
233450d850 CSync: Remove config dir setting 2014-06-04 10:56:56 +02:00
Olivier Goffart
1e43d1fa49 Add missing license headers in tests
LGPL for csync tests,  GPL for mirall tests
2014-02-24 11:08:58 +01:00
Olivier Goffart
2eb9962f4c Adapt the test to the changes in the exclude list
The exclude list was removed from csync in commit
f32d901653
Adapt the test.
2014-01-26 18:58:56 +01:00
Olivier Goffart
c7227297af Make it compile with the merge of csync mirall 2014-01-15 12:20:03 +01:00
Olivier Goffart
bf7ca60bec Move csync in order to merge it with mirall 2014-01-13 14:39:50 +01:00
Renamed from tests/csync_tests/check_csync_exclude.c (Browse further)