Commit graph

496 commits

Author SHA1 Message Date
Klaas Freitag
0c9dcdafc2 csync: Only free the statedb filename on destroy.
The filename must not be wiped in csync_commit as that is
happening after every sync. It is only set once in the
constructor of the SyncEngine in csync_init().
2016-09-29 16:36:14 +02:00
Klaas Freitag
6fd930908c csync_tests: Adopted to new cmocka API. 2016-09-02 15:49:54 +02:00
Klaas Freitag
62125a442d csync_exclude: Also exclude the new syncjournal filename. 2016-09-02 15:49:21 +02:00
Klaas Freitag
2d54fb2ff9 csync_update: Do not check to exclude .csync_journal.db
It is indeed already handled by csync_exclude.
2016-09-02 15:48:45 +02:00
Klaas Freitag
f3cfd2b70b csync: Free statedb file member before realloc 2016-07-17 21:13:17 +02:00
Klaas Freitag
b9ea7c3414 csync: Do not compute the journal name in csync_update any more.
Rely on the name that was passed to csync_init()
2016-07-10 12:54:33 +02:00
Christian Kamm
6e9df8673f Merge remote-tracking branch 'origin/2.2' 2016-06-22 15:41:37 +02:00
ckamm
32bb8295a2 csync: Use the full file stat destructors (#4992)
* For csync_file_stat_t and csync_vio_file_stat_t
* Add original_name to the vio file stat destructor
2016-06-21 12:06:21 +02:00
Klaas Freitag
191177ff22 excludes: Only log if the pattern was really logged. (#4989) 2016-06-20 15:50:20 +02:00
ckamm
43a2aec92b Performance: Don't redundantly add the same exclude files #4967 (#4988)
Excludes: Don't redundantly add the same exclude files #4967, Never accept duplicate exclude patterns #4967
2016-06-20 15:14:13 +02:00
Christian Kamm
87b4693a9d Add error message for trailing spaces on Windows #4878 2016-06-09 12:41:02 +02:00
Christian Kamm
6d02d76cfd Fix compile warnings in tests 2016-06-07 09:43:04 +02:00
Olivier Goffart
159535fe90 Merge branch '2.2' 2016-05-25 16:30:17 +02:00
Daniel Molkentin
eacc0c8bd6 Fix pot. mem leak found by coverity (CID 12900) 2016-05-24 11:21:33 +02:00
orion1024
9f3e576348
Adding CURL check in t6.pl
Aborts immediately if CURL not found, to avoid misleading errors later.
2016-04-30 11:44:16 +02:00
Klaas Freitag
6814342d1f Merge pull request #4748 from owncloud/win_stat_revisited
vio for windows: Use more graceful create file params.
2016-04-28 13:45:30 +02:00
Christian Kamm
68126dcff6 Checksums: Skip uploads of .eml files only #4754
This is a workaround. A correct solution would still update file metadata
such as the mtime. See #4755.
2016-04-28 12:59:39 +02:00
Christian Kamm
e7f00339e6 Fix perl tests #4722
* The dav auth realm is "sabre/dav" for newer server versions
* Content checksums are enabled generally, so conflict detection
  is smarter
2016-04-28 10:44:37 +02:00
Klaas Freitag
051a348afd Vio for windows: Removed the overlap param again.
After discussion and studying docs again we agreed that
the parameter is not neccessary here as it only affects
the process that opens the handle. And we do not want to
do async stuff.
2016-04-27 11:37:21 +02:00
Klaas Freitag
07bdd519e9 vio for windows: Use more graceful create file params. 2016-04-27 11:17:42 +02:00
Klaas Freitag
6ba7c6e2d3 Windows VIO: Remove unused variable. 2016-04-21 17:40:01 +02:00
Klaas Freitag
055c2ef73f local_vio_win: Fix handling files that have been deduplicated
as part of Windows SIS or Data Deduplication. Fixes #4056
2016-04-21 17:38:43 +02:00
Markus Goetz
a17f37d8ae Discovery: Be more explicit about files with unknown size #4573
Also related https://github.com/owncloud/core/issues/23468
2016-04-19 15:31:16 +02:00
Markus Goetz
c4577cb2a1 Merge pull request #4683 from owncloud/fix4657
OS X: Allow ampersand in APPLICATION_NAME #4657
2016-04-15 14:28:38 +02:00
Markus Goetz
d1649ce4df OS X: Allow ampersand in APPLICATION_NAME #4657 2016-04-15 11:30:49 +02:00
Markus Goetz
a0521caf52 CSync: Allow files with 0 mtime #1603
I don't see a reason we should not allow this. We detect
a "failed stat reply" in other ways. Maybe this was a legacy
csync decision somewhow that is not valid anymore?
2016-04-14 18:15:16 +02:00
Christian Kamm
6f454feb39 Fix hidden file handling #4655
There were two issues:

* With the refactoring of how Folder and SyncEngine relate, the
  ignore_hidden_files flag on the CSync context was reset after
  each sync run and not updated from the configuration again.

* The folder watcher failed to enumerate hidden folders and thus
  didn't watch for changes inside them. (linux only)
2016-04-12 11:59:07 +02:00
Christian Kamm
ceb4a23dab Fix compile with strict C flags 2016-03-18 12:41:57 +01:00
Christian Kamm
d7bd1300a8 Ignores: expand escapes #4568 2016-03-17 14:31:53 +01:00
Jocelyn Turcotte
7561f5c717 Add comment and cleanup the csync exclude list code
Removed the csync_add_exclude_list function that isn't use anywhere
anymore.
2016-03-03 20:26:48 +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
Hefee
28b694b170 Merge branch '2.1' 2016-02-20 10:34:34 +01:00
Hefee
74f74e0363 fix typo occured->occurred 2016-02-20 10:33:13 +01:00
Olivier Goffart
93308faeb9 Merge remote-tracking branch 'origin/2.1'
Conflicts:
	doc/building.rst
2016-02-08 14:28:25 +01:00
Olivier Goffart
6b643c7501 Discovery: don't ignore recall file #4420
The ".sys.admin#recall#" is the recall file and should not be ignored
even if hidden.

The remote discovery do not need to detect hidden files because it
is already detected by csync in all cases. So this avoid code duplication
2016-02-08 12:07:34 +01:00
Hefee
aa8b772bff Don't install tests and cmocka lib.
Neither tests nor the libcmocka needs to be installed globally.
2016-02-05 14:14:07 +01:00
Klaas Freitag
57c7727479 csync_update: Remove unneeded checks of previous commit. 2016-01-29 10:43:31 +01:00
Klaas Freitag
28907ec0c3 csync_update: Handle comparision of file types properly.
Note that the structs use different enums for the file types, unfortunately.
2016-01-27 14:11:37 +01:00
Klaas Freitag
7ddfa79950 csync_update: Use the csync defines rather than plain numbers. 2016-01-27 14:10:52 +01:00
Daniel Molkentin
dd76d72d61 Merge remote-tracking branch 'origin/2.1' 2016-01-26 14:09:38 +01:00
Christian Kamm
62ded39416 Update: Check checksum for renamed files #2983
This currently doesn't do much because we only compute content
checksums for .eml files.
2016-01-20 13:21:48 +01:00
Klaas Freitag
a41fbc0454 csync_private: Fix comment about size of file id buffer 2016-01-15 12:14:46 +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
abf5a5ad1e Propagation: Fix dir <-> file changes propagating to server #4302
* Ensure every time a file becomes a directory or the other way around
  the item is flagged as INSTRUCTION_TYPE_CHANGE.
* Delete the badly-typed entity if necessary in the propagation jobs.
2016-01-08 05:38:08 +01:00
Christian Kamm
5cc4c03b6a Propagator: Deal with files becoming directories #4302
This needed adjustments in reconcile, to mark the item as SYNC
as well as additions to the LocalMkdir job.
2016-01-05 10:26:41 +01:00
Olivier Goffart
cf5b1e401c csync_vio_local_stat: Win: fetch mtime and size if not previously fetched
Since owncloud 2.1, csync_vio_local_stat was optimized because readdir
would already fetch most of the info.  This works for the discovery,
but not later.  And we used this function later for symliks and co.

So this fixes the .lnk on windows

Issue #4300
2015-12-21 14:25:30 +01:00
Olivier Goffart
685f2a259f csync: remove PLUGIN install patch from cmake files
This conflicts with the KDE_INSTALL_PLUGINDIR and prevent the
dolphin plugin to be installed at the right location.

Since csync no longer have plugin, this can be removed
2015-12-02 13:13:41 +01:00
Christian Kamm
1aa570326e Tests: Add a perl test for eml checksums #3235 2015-11-25 12:48:24 +01:00
Christian Kamm
2458f07ca1 Checksums: Reuse the discovery checksum where possible 2015-11-23 14:13:10 +01:00