Commit graph

122 commits

Author SHA1 Message Date
Klaas Freitag
4cc1ef3624 Merge remote-tracking branch 'freitag/dav' into ocsync
Conflicts:
	src/csync_propagate.c
	src/csync_statedb.c
2013-09-04 15:51:38 +02:00
Klaas Freitag
ce554eb44a Let csync exclude report the exclude reason. 2013-09-02 17:23:17 +02:00
Olivier Goffart
56d5359f5b Fix compilation after merge
Still untetested
2013-08-18 18:55:32 +02:00
Daniel Molkentin
6cda2f0c24 Do not report removable ignored files 2013-08-18 17:52:45 +02:00
Olivier Goffart
4e04a2ccb0 Addapt to new error codes 2013-08-18 17:29:23 +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
Klaas Freitag
76ee4cb3ba Add symlinks to the file tree with instruction IGNORE 2013-08-07 12:14:29 +02:00
Klaas Freitag
7b22972630 Add excluded files to the tree with IGNORE instruction 2013-08-06 18:01:34 +02:00
Klaas Freitag
d585742609 Log if the Etag in the journal is empty. 2013-08-06 12:12:53 +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
Olivier Goffart
af7e36422e Add ignore files that need cleanup
Add the possibility to ignore files but specify they should be deleted
if the directory is deleted.
2013-07-29 15:03:25 +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
Andreas Schneider
dbd242442f update: Make sure ulen is initialized. 2013-07-25 08:36:23 +02:00
Andreas Schneider
c00e401306 update: Make sure we don't have an invalid path pointer. 2013-07-24 16:01:00 +02:00
Olivier Goffart
7a8b07443f Fix cases where the file has been replaced by another with the same mtime
IL issue 169
2013-07-23 16:03:50 +02:00
Andreas Schneider
8953ed544c statedb: Remove context where it isn't needed. 2013-07-04 10:29:48 +02:00
Andreas Schneider
d05b077851 statedb: Always pass down the db pointer. 2013-07-04 10:29:19 +02:00
Olivier Goffart
1c9fa48d60 Create a function to free a csync_file_stat 2013-07-02 18:25:17 +02:00
Olivier Goffart
0dbecb129e Log the fact that csync was aborted 2013-06-19 18:41:30 +02:00
Olivier Goffart
ed76e5f1f2 Fix conflict file appearing when a file cannot be stated
We still need to fetch the md5 from the database to be able to store it
back.
2013-06-13 15:06:35 +02:00
Klaas Freitag
e92dd4c1da Removed some logs that are not needed. 2013-06-05 16:35:48 +02:00
Klaas Freitag
92b0af4b0a Compare the correct type. 2013-05-22 16:13:27 +02:00
Olivier Goffart
d8d4f118d7 Fix possible leak 2013-05-15 17:59:13 +02:00
Klaas Freitag
1a648a612e Merge remote-tracking branch 'ogoffart/rename_folders_merged' into dav 2013-05-13 16:28:31 +02:00
Klaas Freitag
276ccd3fb6 Fix setting of csync error code in updater. 2013-05-09 14:12:26 +02:00
Daniel Molkentin
ee5aaf76c5 Introduce csync_abort()
If called, it will set a bool in the context,
which will be respected by all expensive visitors.
2013-05-08 16:57:12 +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
b1fc9b2a64 Don't reset the md5 if the mtime change locally.
Consider this case when one creates a file with an invalid filename (for
the server) in a directory in the local side.
say: foo/bar/%invalid%.txt

The following would happen:
- in the update for the local parent folder  foo/bar/, the md5 is 0
  because the mtime has changed
- During the reconcile, we try to send %invalid%, but there will be an
  error and nothing will be changed on the server, the etags stay the
  same
- We do not do any PROPFIND at the end so we do not fetch the etag
  anymore.  The md5 is still 0 and will be saved like that in the DB
- Next run, since the etags have  not changed on the server, we read
  from the DB.  But a md5 of 0 in the DB means the folder was removed on
  the server.  That would remove the local folder (BAD!)

So we load the md5 from the db even if the local mtime change.
That means we need to compare the mtime in the local case rather than
the md5 to see if something has changed.
2013-05-03 19:21:21 +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
cf23799e78 Only mark a folder as modified if files within it are modified. 2013-05-03 19:21:21 +02:00
Olivier Goffart
eb38f5beb1 Don't reset the md5 if the mtime change locally.
Consider this case when one creates a file with an invalid filename (for
the server) in a directory in the local side.
say: foo/bar/%invalid%.txt

The following would happen:
- in the update for the local parent folder  foo/bar/, the md5 is 0
  because the mtime has changed
- During the reconcile, we try to send %invalid%, but there will be an
  error and nothing will be changed on the server, the etags stay the
  same
- We do not do any PROPFIND at the end so we do not fetch the etag
  anymore.  The md5 is still 0 and will be saved like that in the DB
- Next run, since the etags have  not changed on the server, we read
  from the DB.  But a md5 of 0 in the DB means the folder was removed on
  the server.  That would remove the local folder (BAD!)

So we load the md5 from the db even if the local mtime change.
That means we need to compare the mtime in the local case rather than
the md5 to see if something has changed.
2013-04-24 14:09:20 +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
84febf4b77 Merge branch 'dav_0.70.5' into dav 2013-04-15 15:37:17 +02:00
Klaas Freitag
c38514934c A good word. 2013-04-09 14:41:36 +02:00
Daniel Molkentin
aa390dd17e Set path and phash for ignored files 2013-04-08 14:21:00 +02:00
Andreas Schneider
85b565fcbe csync: Use macros for CSYNC_STATUS checking. 2013-04-06 18:48:16 +02:00
Andreas Schneider
7934cde2db csync: Pass the errno to csync_errno_to_status().
This is needed to be sure we are thread-safe. See also the manpage of
strerror_r(3).
2013-04-06 18:48:16 +02:00
Klaas Freitag
2204c94770 Introduce csync status codes
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2013-04-05 17:40:22 +02:00
Klaas Freitag
0bea2ea8f9 Push len computing to the right place. 2013-04-03 16:38:35 +02:00
Klaas Freitag
34668e42b3 Merge branch 'dav_0.70.5' into dav - WIP
Conflicts:
	CMakeLists.txt
	CPackConfig.cmake
	src/csync.h
	src/csync_update.c
	tests/ownCloud/t1.pl
2013-04-02 14:44:01 +02:00
Klaas Freitag
ef7c5c261d Fix memory allocation for path. 2013-03-22 21:48:01 +01:00
Klaas Freitag
5657ff3d34 Fix: set path correctly. 2013-03-22 16:29:04 +01:00
Klaas Freitag
19f07f9aea Handle non statable files correctly, read missing info from db. 2013-03-20 21:56:09 +01:00
Klaas Freitag
5a8d90cc25 Fix path handling in update routine. 2013-03-19 16:22:11 +01:00
Klaas Freitag
db70a3b2ae Skip files which are not statable and ignore links and such. 2013-03-19 14:20:38 +01:00
Klaas Freitag
e3a4ec453c Handle non statable files gracefully. 2013-03-19 14:20:03 +01:00
Klaas Freitag
13c44ad25c Skip files which are not statable and ignore links and such. 2013-03-19 14:02:12 +01:00
Klaas Freitag
d943b2880a Handle non statable files gracefully. 2013-03-19 11:48:46 +01:00
Olivier Goffart
b99677f985 Only mark a folder as modified if files within it are modified. 2013-03-11 20:38:17 +01:00