Commit graph

23 commits

Author SHA1 Message Date
Daniel Molkentin
1663c84db7 Return an error if rename fails on win32.
Amends 9ea39dbaa9.
2013-08-15 18:06:27 +02:00
Klaas Freitag
9ea39dbaa9 win32: Retry renaming in case of access denied. 2013-08-15 17:40:30 +02:00
Klaas Freitag
274da3ad0b std: Fix uninitialized rc that polutes return value. 2013-08-14 19:03:36 +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
Klaas Freitag
90873a9ae8 Release memory properly in error case, Coverity found. 2013-07-12 11:41:51 +02:00
Klaas Freitag
566f5ce614 Close fd even if its zero. Coverity Found. 2013-07-12 11:41:50 +02:00
Klaas Freitag
3a51c9ce8b Added rename function to csync library. 2013-07-09 11:11:49 +02:00
Klaas Freitag
a84332c910 Improved C style and added more tests. 2013-03-26 12:00:57 +01:00
Klaas Freitag
3ce614039a Added c_compare_file function and test - WIP. 2013-03-22 10:23:17 +01:00
Daniel Molkentin
49d2fd685b iconv support
This allows for files on mac to automatically be converted to UNC
2012-12-07 13:03:01 +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
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
5844b203e6 file: Use a smaller buffer value for c_copy(). 2012-10-19 20:37:13 +02:00
Andreas Schneider
6456cc36a5 file: Ensure we don't call close() on negative numbers on error.
Found by Coverity.
2012-10-19 19:42:04 +02:00
Klaas Freitag
9b64825c69 win32: use wide char variant of CopyFile for file copy. 2012-06-13 17:32:13 +02:00
Klaas Freitag
9ec8d70822 Do proper handling of Win32 special characters.
Introduced a tchar based handling of wide character encoding that
is happening on Windows platforms.
2012-05-09 16:55:56 +02:00
Klaas Freitag
3ae453cc36 std: Renamed struct_stat to csync_stat_t and use c_private.h again.
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2012-03-21 13:48:41 +01:00
Klaas Freitag
ffd2e0e767 Fixed file copy for Win32 platform by using API function FileCopy. 2012-03-19 12:40:30 +01:00
Dominik Schmidt
d1ea29f4aa Don't check for links on non-unix platforms 2012-03-02 17:04:02 +01:00
Dominik Schmidt
ee6c631f28 windows: add missing status codes, types and return-values 2012-03-02 17:04:02 +01:00
Andreas Schneider
5168e3ee70 Change name of the buffersize so that they can't conflict. 2008-06-02 16:05:40 +02:00
Andreas Schneider
393c3ce9db Initialize variables. 2008-05-08 16:07:15 +02:00
Andreas Schneider
1b29a420bc Initial commit 2008-02-27 18:56:47 +01:00