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
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
Daniel Molkentin
6882880ba7
Add csync_clear_exclude_list
...
This requires the introduction of c_strlist_clear(),
which does not destroy, but only clear a string list.
2013-07-15 14:37:18 +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
cab00ea668
Added missing CloseHandle, detected by Coverty.
2013-06-05 16:34:58 +02:00
Klaas Freitag
2f6441afb0
Do not use asprintf any more, added missing header.
2013-04-22 14:30:57 +02:00
Klaas Freitag
072edefc7b
Use __mingw_asprintf if asprintf is not available.
2013-04-22 13:51:53 +02:00
Klaas Freitag
8b52387c1a
Fix temp file name generation for Win32.
2013-04-15 13:24:46 +02:00
Klaas Freitag
ec51a6933a
Improve c_tmpname function to generate tmp name properly.
2013-04-04 12:59:39 +02:00
Klaas Freitag
a84332c910
Improved C style and added more tests.
2013-03-26 12:00:57 +01:00
Klaas Freitag
a3f29967f7
Test added for c_compare_file.
2013-03-22 13:54:46 +01:00
Klaas Freitag
3ce614039a
Added c_compare_file function and test - WIP.
2013-03-22 10:23:17 +01:00
Klaas Freitag
a79c380707
Remove strange _tcslen define and fixed some potential leaks.
2013-02-07 14:45:12 +02:00
Olivier Goffart
97e0e75ae2
Missing errno code on mingw
2013-01-10 11:32:42 +01:00
Klaas Freitag
96eb138410
Make big file support working for win32.
2013-01-09 15:06:03 +01:00
Klaas Freitag
5e4c0acc6b
Use wide char variable to remove directory.
2013-01-09 15:02:07 +01:00
Olivier Goffart
5bc95e1667
Fix memory leak
2012-12-14 11:19:14 +01:00
Daniel Molkentin
131e52b370
Unbreak win32
2012-12-09 02:44:34 +03:00
Klaas Freitag
9b1dcb23f8
Avoid crash in iconv destroy.
2012-12-08 11:06:29 +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
Klaas Freitag
905e97f2ab
Use _tclosedir rather than closedir.
2012-11-13 11:45:12 +01:00
Klaas Freitag
a0fcd35183
win32: Ported two other occurences of win32 api to wide char support.
2012-11-12 10:44:24 +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
6dbdbf0997
dir: Don't leak resources on error in c_rmdirs().
...
Found by Coverity.
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
Andreas Schneider
81a0dc8cb0
rbtree: Fix finding the node with a NIL child.
...
Found by Coverity.
2012-10-19 19:14:54 +02:00
Klaas Freitag
fc6cd714c7
win32: Fix random file name generation, init random generator once.
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2012-09-04 12:19:12 +02:00
Klaas Freitag
1866956984
use lstat instead of stat to stat files. Avoids problems with links.
2012-07-11 16:48:38 +02:00
Klaas Freitag
b9329f2991
undef malloc only if not doing UNIT_TESTING.
2012-07-09 14:09:34 +02:00
Klaas Freitag
9836ec864a
win32: Fix random file name generation, init random generator once.
2012-06-20 10:40:40 +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
13847b9249
Fix wide character support for the mkdir definition.
2012-06-08 12:52:06 +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
Dominik Schmidt
a8c10780f2
Compile cstdlib with -fPIC.
2012-05-04 12:04:30 +02:00
Dominik Schmidt
5ac2f676d7
Define O_NOATIME to 0 if it's not there.
2012-05-04 12:03:53 +02:00
Klaas Freitag
ec921a1e51
Win32: Added some specific headers to c_private.h to fix build.
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2012-04-17 10:47:56 +02:00
Klaas Freitag
2ac172f4fe
update: Add new exported file tree traverse functions.
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2012-04-17 10:45:04 +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
Andreas Schneider
f0cf678c0e
Fix config checks.
2012-03-02 17:04:02 +01:00
Dominik Schmidt
6e4ce19a85
Add csync_fnmatch
2012-03-02 17:04:02 +01:00
Dominik Schmidt
d1ea29f4aa
Don't check for links on non-unix platforms
2012-03-02 17:04:02 +01:00
Dominik Schmidt
6272a2b485
Use stat if lstat is not available
2012-03-02 17:04:02 +01:00