Commit graph

482 commits

Author SHA1 Message Date
Daniel Molkentin
eacc0c8bd6 Fix pot. mem leak found by coverity (CID 12900) 2016-05-24 11:21:33 +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
Christian Kamm
3b7927366a csync_update: Remove disabled inode check 2015-11-23 12:01:42 +01:00
Christian Kamm
a25f094c4c Checksums: Don't reupload if size and checksum are unchanged #3235
* Compute the content checksum (in addition to the optional
  transmission checksum) during upload (.eml files only)

* Add hook to compute and compare the checksum in csync_update

* Add content checksum to database, remove transmission checksum
2015-11-23 11:59:56 +01:00
Klaas Freitag
be88e5a2c3 csync_update: refactor a bit and remove redundant code. 2015-11-18 15:31:55 +01:00
Klaas Freitag
e7ad7d405c csync_update: Add missing comment about 403 forbidden handling. 2015-11-18 15:31:55 +01:00
Klaas Freitag
62d26814b2 SyncEngine: Handle 403 Forbidden properly.
A 403 is a reply code sent from the file firewall to indicate that
this directory is forbidden to use for the user.

The patch handles it by setting the state to IGNORED.

This addresses #3490
2015-11-18 15:31:55 +01:00
Christian Kamm
beb970646b Fix csync_exclude test
The exclude file was reorganized in
b6aa18bfbc
2015-11-11 09:42:31 +01:00
Christian Kamm
d9f8edd259 Hidden files: Consider .* hidden everywhere #4023
This seems to be the only place where we did this only on
non-windows OSes.
2015-10-29 11:59:46 +01:00
Markus Goetz
a6c9e8c5b4 Merge branch 'kill_legacy_propagator' 2015-10-28 11:06:50 +01:00
Christian Kamm
c81b02c7d9 csync tests: Remove unused function 2015-10-28 10:04:15 +01:00
Christian Kamm
d2e5ba123d Fix compile after pull request merge
It conflicted with the optimization in
f18b40f7e7
2015-10-28 09:53:06 +01:00
Klaas Freitag
0c9568f6dc Merge pull request #4004 from owncloud/fix_hidden_detection
Fix hidden detection
2015-10-28 09:28:35 +01:00
Klaas Freitag
6b71273380 Discovery: Fix detection of hidden files.
In the discovery phase we want to detect that dot-files are hidden
on Linux and Mac.

This fixes strange behaviour seen in issue #3980
2015-10-26 14:24:05 +01:00
Olivier Goffart
f18b40f7e7 csync_vio: reuse the information from readdir in stat
On unix we don't safe much (otherwise csync would have been
designed differently).
On windows however, the readdir already fetch all the info, so we
can as well use it.

We still have to query for the file id but we might optimize that later
2015-10-22 18:46:41 +02:00
Olivier Goffart
91525a7d33 csync_exclude: Don't ignore invalid char client side (#3736)
If the server does not support it, then the server will reply with an error
2015-10-22 12:32:53 +02:00