Commit graph

1238 commits

Author SHA1 Message Date
Olivier Goffart
f55f687a63 Win: Don't rely on the name of the program to be owncloud.exe
Loosely based on the logic in csync_vio_init
2012-11-07 17:46:13 +01:00
Olivier Goffart
a4db29c277 c_copy: return error code on windows if there is an error
This fixes a compiler warning about not returning a value
2012-11-07 17:46:13 +01:00
Olivier Goffart
e2a8e9dce2 win: Link against all the required libraries 2012-11-07 17:46:13 +01:00
Markus Goetz
80d53ff4bd Enable compilation with static iniparser and sqlite 2012-11-07 17:46:13 +01:00
Olivier Goffart
be13ef120d Fix another crash if the md5 are not computed 2012-11-07 16:50:20 +01:00
Klaas Freitag
67373dcb0d commented work in progress treewalk stuff. 2012-11-07 12:33:39 +01:00
Klaas Freitag
f65be04415 Added Windows tmp file pattern to exclude list. 2012-11-06 14:05:52 +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
Olivier Goffart
7071a455c5 Use signed hash in SQL request
sqlite only handle signed integer,  in case of overflow, we numbers are
transformed to floating point, resulting in wierd errors.
2012-11-06 14:05:52 +01:00
Klaas Freitag
898d51f92d WIP: Try to catch a cleared remote path 2012-10-31 21:38:57 +01:00
Klaas Freitag
e183854b58 Added experimental function to check if a file is known locally. 2012-10-31 21:33:17 +01:00
Klaas Freitag
2206c4a4d1 Fix printf operators for time delta values. 2012-10-31 21:33:17 +01:00
Klaas Freitag
af11613fba Some cleanup of platform specific code. 2012-10-31 21:09:33 +01:00
Klaas Freitag
2fa07b1dd9 set pointer void to avoid warning on linux compile. 2012-10-31 21:08:40 +01:00
Klaas Freitag
803b3fb542 Fix compile with mingw32 for win32, removed int decl in for loop. 2012-10-31 21:08:08 +01:00
Klaas Freitag
abb3829197 Use win32 function GetFileTime to fix DTS problems on windows. 2012-10-31 20:56:24 +01:00
Klaas Freitag
4104737533 Hide the journal database under windows using win32 API. 2012-10-31 20:56:06 +01:00
Klaas Freitag
8afe182e0c Fix merge: Initialise data before accessing them. 2012-10-28 11:31:25 +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
Klaas Freitag
557b4bbe25 Use LIKE instead of GLOB to find files in dirs in database.
This fixes Github issue mirall#25
2012-10-27 12:03:39 +02:00
Klaas Freitag
9e4c873b16 Fixed csync testcases. 2012-10-26 21:33:13 +02:00
Klaas Freitag
0db9427377 Add name of rename target to treewalk data structure. 2012-10-26 20:01:25 +02:00
Klaas Freitag
8bdf0694ca Another rename issue to ocsync instead of csync. 2012-10-26 19:59:45 +02:00
Klaas Freitag
d82850f145 Fix more csync->ocsync renaming issues. 2012-10-26 16:11:34 +02:00
Klaas Freitag
0cea891a98 Fix name of config file in log test case. 2012-10-26 11:53:29 +02:00
Andreas Schneider
14f03e0ebb exclude: Simplify the csync_excluded() loop.
Thanks to Klaas Freitag.
2012-10-22 15:32:28 +02:00
Andreas Schneider
e43466d09d tests: Add exclude test for journal db names. 2012-10-22 15:13:52 +02:00
Andreas Schneider
51ce3bea37 exclude: Reduce memory allocations of csync_excluded(). 2012-10-22 15:13:02 +02:00
Andreas Schneider
9b11339a9e util: Remove obsolete csync_create_statedb_hash(). 2012-10-22 14:55:26 +02:00
Andreas Schneider
f92b8f1db7 exclude: Make sure we don't sync the csync_journal.db. 2012-10-22 14:55:26 +02:00
Andreas Schneider
76e6fbb72f csync: Move the statedb (journal) to the local directory. 2012-10-22 14:53:59 +02:00
Andreas Schneider
42421cb4cc exclude: Rework csync_excluded() to not leak memory on error. 2012-10-22 14:53:27 +02:00
Andreas Schneider
d507358c95 exclude: Fix build warning. 2012-10-22 14:39:03 +02:00
Klaas Freitag
01a25db3fb exclude: Fix checking the exclude pattern for subdirs.
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2012-10-22 12:26:35 +02:00
Andreas Schneider
31382d909e vio: Fix a build warning. 2012-10-22 11:21:34 +02:00
Andreas Schneider
304371eecb build: Add an option for clang. 2012-10-22 11:21:18 +02:00
Andreas Schneider
cea0c9e85f cmake: Fix compile option on UNIX with Clang. 2012-10-22 11:20:30 +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
Andreas Schneider
12d5d012f3 lock: Use a secure umask for mkstemp(). 2012-10-19 20:37:13 +02:00
Andreas Schneider
351c6089fc modules: Return in dummy_stat() if we have no memory. 2012-10-19 20:37:13 +02:00
Andreas Schneider
5844b203e6 file: Use a smaller buffer value for c_copy(). 2012-10-19 20:37:13 +02:00
Andreas Schneider
6dbdbf0997 dir: Don't leak resources on error in c_rmdirs().
Found by Coverity.
2012-10-19 20:37:13 +02:00
Andreas Schneider
6ae00fe3b2 csync: Don't leak memory on error in csync_create().
Found by Coverity.
2012-10-19 20:37:13 +02:00
Andreas Schneider
6023db367b update: Fix a memory leak in _csync_detect_update().
Found by Coverity.
2012-10-19 20:37:13 +02:00
Andreas Schneider
47f1560d87 update: Don't leak dh on error.
Found by Coverity.
2012-10-19 20:37:13 +02:00
Andreas Schneider
b4464bd92f statedb: Don't leak the file descriptior on error.
Found by Coverity.
2012-10-19 20:37:13 +02:00
Andreas Schneider
1d8378e307 statedb: Ensure we don't leak memory in csync_statedb_query().
Found by Coverity.
2012-10-19 20:37:13 +02:00
Andreas Schneider
b330df73a1 vio: Fix a possible resource leak in csync_vio_local_creat().
Found by Coverity.
2012-10-19 20:37:13 +02:00
Andreas Schneider
2e01dc8d88 vio: Fix a possible resource leak in csync_vio_local_open().
Found by Coverity.
2012-10-19 20:37:13 +02:00
Andreas Schneider
4010096cdf exclude: Rework _csync_exclude_add() to check for no memory.
Found by Coverity.
2012-10-19 20:37:13 +02:00