Commit graph

61 commits

Author SHA1 Message Date
Olivier Goffart
bf7ca60bec Move csync in order to merge it with mirall 2014-01-13 14:39:50 +01:00
hefee
7e2dec5228 fixing typo 2013-12-11 18:31:31 +01:00
Olivier Goffart
4eb19000a4 Differentiate the RENAME and EVAL_RENAME
EVAL_RENAME is set at the update phase and means that this is the destination of
a file that has been renamed.
RENAME is set for the file that need to be renamed.

Before, we knew the difference because of which remote the instruction was
but now we need to make the distinction explicit
2013-11-14 17:08:42 +01:00
Klaas Freitag
a52fd99a95 Removed database writing code.
All this is now done in the Qt based propagator class.
2013-10-23 17:51:16 +02:00
Klaas Freitag
8d14286bd3 Merge dav and transmit the mtime with the PUT request 2013-09-25 14:23:04 +02:00
Klaas Freitag
c54a3ab7cc Added missing parenthesis. 2013-09-16 14:16:14 +02:00
Olivier Goffart
56d5359f5b Fix compilation after merge
Still untetested
2013-08-18 18:55:32 +02:00
Olivier Goffart
2afdc9d095 Adapt to new multybyte api after merge
(Search and replace)
2013-08-18 16:43:46 +02:00
Olivier Goffart
b5ed352aa3 Merge remote-tracking branch 'origin/master' into ocsync
Only confluct resolution, do not compile or works

Conflicts:
	CMakeLists.txt
	CPackConfig.cmake
	ConfigureChecks.cmake
	client/csync_client.c
	cmake/Modules/DefineCompilerFlags.cmake
	cmake/Modules/DefineInstallationPaths.cmake
	cmake/Modules/FindIconv.cmake
	cmake/Modules/FindIniparser.cmake
	cmake/Modules/FindNeon.cmake
	config.h.cmake
	config/CMakeLists.txt
	config/ocsync.conf
	doc/CMakeLists.txt
	modules/csync_owncloud.c
	modules/csync_sftp2.c
	src/CMakeLists.txt
	src/csync.c
	src/csync.h
	src/csync_config.c
	src/csync_exclude.c
	src/csync_lock.c
	src/csync_macros.h
	src/csync_misc.c
	src/csync_misc.h
	src/csync_private.h
	src/csync_propagate.c
	src/csync_statedb.c
	src/csync_statedb.h
	src/csync_update.c
	src/csync_util.c
	src/csync_util.h
	src/std/c_dir.c
	src/std/c_file.c
	src/std/c_private.h
	src/std/c_string.c
	src/std/c_string.h
	src/std/c_time.c
	src/vio/csync_vio.c
	src/vio/csync_vio.h
	src/vio/csync_vio_file_stat.h
	src/vio/csync_vio_local.c
	src/vio/csync_vio_method.h
	tests/CMakeLists.txt
	tests/csync_tests/check_csync_statedb_load.c
	tests/csync_tests/check_csync_statedb_query.c
	tests/csync_tests/check_csync_treewalk.c
	tests/csync_tests/check_csync_update.c
	tests/ownCloud/HTTP/DAV.pm
	tests/ownCloud/ownCloud/Test.pm
	tests/std_tests/check_std_c_str.c
	tests/vio_tests/check_vio.c
2013-08-18 16:21:18 +02:00
Daniel Molkentin
8c9799cede Ignore false-positive compiler warnings 2013-08-02 15:19:41 +02:00
Daniel Molkentin
8d99364d63 Eliminate all warnings
- use proper casts
- use aproproate types
- offer to build with -Werror
- make printf attribute hinting gnu format style
- remove unused helper methods
- begin to use inttyes.h macros where suitable
- move var declarations to the beginning of the method
- properly use _FILE_OFFSET_BITS
- silence variables unused depending on the define
2013-07-31 13:12:10 +02:00
Andreas Schneider
d80da2a088 LICENSE: Change license of libcsync from GPL to LGPL.
All contributors have agreed to change the license of libcsync to LGPL.
2013-07-29 14:04:37 +02:00
Olivier Goffart
fdd1f885a1 Fixup previous commit.
We should not overwrite the error
2013-07-16 13:34:59 +02:00
Olivier Goffart
db7e8560cf Mark parent directory as error if a file fails to download
The result is that we do not save the parent directory in the db
(recursively) so on the next sync, we don't read this directory from the
db as there might be missing entries since download error are not saved
in the db.
2013-07-16 13:34:47 +02:00
Klaas Freitag
123472e286 src: Add function csync_vio_convert_file_stat(). 2013-07-04 10:39:59 +02:00
Olivier Goffart
f8fdff885e Make sure to write the errors in the DB as well.
If a file can't be uploaded, we still need to write it into the DB if it
was in the DB before, with the old timestamp.
2013-07-02 23:07:37 +02:00
Olivier Goffart
3c87cd71d7 Merge branch 'rename_folders' into dav
Conflicts:
	modules/csync_owncloud.c
	src/csync.c
	src/csync.h
	src/csync_propagate.c
	src/csync_propagate.h
	src/csync_statedb.c
	src/csync_statedb.h
	src/csync_util.c
	src/std/c_path.h
2013-05-07 15:24:12 +02:00
Olivier Goffart
b49aaaabfc Fix too many PROPFIND when starting a sync
csync would not update the etag (md5) for directoru in the database if
the etag has changed, but none of the files within that directory
actually changed
2013-05-03 19:21:21 +02:00
Olivier Goffart
959c987749 Fix storing the error of renames 2013-04-24 14:53:31 +02:00
Olivier Goffart
112285c9aa Fix too many PROPFIND when starting a sync
csync would not update the etag (md5) for directoru in the database if
the etag has changed, but none of the files within that directory
actually changed
2013-04-17 16:25:52 +02:00
Klaas Freitag
945be9438c Avoid variable name new to not confuse syntax highlighter. 2013-03-20 21:55:34 +01:00
Andreas Schneider
91d92bfa16 log: Add functions to set userdata for the logging callback. 2013-03-01 09:59:55 +01:00
Olivier Goffart
c8e274110a Don't abort in merge_tree if the file don't exist
Scenario:
We have  A/B/C/file.txt
mv A/B/{C,C2}
start sync, and before sync ends
mv A A2
then as sync start and we try to merge, since it is no longer possible
to stat A/B/ which has been updated as C was moved, then the database
would not be synced
then start sync again and A/B/C2/file.txt is seen as new, and is
duplicated

By saving the database anyhow we work around that problem
2013-01-10 11:32:41 +01:00
Klaas Freitag
e3ef10765b Avoid a compile warning. 2012-12-14 16:49:03 +01:00
Olivier Goffart
4e8ff9ae05 Fix end of file.
csync_util.c:347:1: error: no newline at end of file [-Werror,-pedantic,-Wnewline-eof]
2012-12-12 14:20:48 +01:00
Markus Goetz
885e073b8a Win32: Hide file while downloading 2012-12-10 19:15:16 +01:00
Olivier Goffart
95edd6a9de Merge remote-tracking branch 'origin/master' into dav
Conflicts:
	config/ocsync_log.conf
	src/csync.c
	src/csync.h
	src/csync_config.c
	src/csync_log.h
	src/csync_private.h
	src/csync_statedb.c
	tests/csync_tests/check_csync_config.c
2012-12-03 17:32:08 +01:00
Olivier Goffart
1a093b0ae3 Fix crash if md5 is null
Also make sure to copy destpath, to avoid double free.
2012-11-06 14:05:52 +01:00
Andreas Schneider
8a0b4319d3 csync: Add a new logging system. 2012-10-30 11:27:21 +01:00
Klaas Freitag
2bb52ef6f9 Merge branch 'master' into dav - get cmocka tests and database move.
Conflicts:
	CMakeLists.txt
	cmake/Modules/FindCMocka.cmake
	src/csync.c
	src/csync_exclude.c
	src/csync_reconcile.c
	src/csync_statedb.c
	src/csync_update.c
	src/csync_util.c
	src/vio/csync_vio.c
	tests/CMakeLists.txt
	tests/csync_tests/check_csync_exclude.c
	tests/csync_tests/check_csync_statedb_load.c
	tests/csync_tests/check_csync_statedb_query.c
	tests/csync_tests/check_csync_update.c
	tests/std_tests/check_std_c_path.c
2012-10-27 19:27:14 +02:00
Andreas Schneider
9b11339a9e util: Remove obsolete csync_create_statedb_hash(). 2012-10-22 14:55:26 +02:00
Andreas Schneider
68abef8626 util: Improve statedb hashing function to avoid possible data loss.
The statedb hash function only hashes the remote side and not the local
path. So if a user changes to a new empty directory to sync it with the
remote counter part, csync will delete all files.

This will result in a new full sync for all sync setups, but we will not
loose any data.
2012-10-22 11:00:51 +02:00
Benjamin Legrand
cb8a501241 Fix a typeo and rename REPLCIA to REPLICA.
BUG #8

Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2012-10-19 15:59:51 +02:00
Klaas Freitag
aad8e5320a Some more memory cleanups after valgrinding. 2012-10-18 13:26:44 +02:00
Klaas Freitag
2af0d6f1a4 Be careful with memory, some fixes for that. 2012-09-26 15:32:38 +02:00
Klaas Freitag
34249e9f64 Use destination path in case of file rename. 2012-09-24 15:57:32 +03:00
Klaas Freitag
ffc5e6f0cc Memory cleanups for id syncing, removed unused code. 2012-08-30 13:04:48 +03:00
Klaas Freitag
99691059bf Removed all usage of openSSL. 2012-08-29 15:37:31 +03:00
Klaas Freitag
7f7c2b977c Avoid a null pointer dereference. 2012-08-23 17:44:07 +03:00
Klaas Freitag
1c6da9c0bb Update the md5 sum of files in merge. 2012-08-23 17:43:51 +03:00
Klaas Freitag
ae5394ad75 UniqID based syncing, first WIP state. 2012-08-23 17:38:44 +03:00
Klaas Freitag
2b4261f15a Added functions to generate MD5-Sums based on openssl with tests. 2012-07-18 17:00:46 +02:00
Klaas Freitag
f0a84bb5da Fix use of strerror_r on non GNU platforms. 2012-03-19 12:40:43 +01:00
Andreas Schneider
f0cf678c0e Fix config checks. 2012-03-02 17:04:02 +01:00
Andreas Schneider
f753a3db0a util: Rename temp file of the unix extension test. 2012-02-22 16:18:07 +01:00
Christian Jann
ffd7d5b247 better idea to align the INSTRUCTIONs printf(%-20s,...) 2011-04-12 19:42:08 +02:00
Christian Jann
deb620b5be align everything correctly (easier to read)
prefix "CSYNC_": no extra information -> removed
we could even remove "INSTRUCTION_" or change it to "INST_"
2011-04-12 17:09:39 +02:00
Andreas Schneider
fdea54edc5 Fix the vim modlines. 2009-05-13 10:12:07 +02:00
Andreas Schneider
2331568f08 Fix a segfault if we use a local path. 2009-01-22 15:21:06 +01:00
Andreas Schneider
ecca37d2a1 Normalize the path to <host>/<path> for the statedb filename.
This should fix problem if a user uses pam_csync and csync with different
urls (#27).
2009-01-22 14:44:06 +01:00