Commit graph

1390 commits

Author SHA1 Message Date
Olivier Goffart
97e0e75ae2 Missing errno code on mingw 2013-01-10 11:32:42 +01:00
Olivier Goffart
6f1e70aae6 Always use the db even if the mtime change localy.
As long as the md5 is the same, use the db, even if the mtime change
localy.
2013-01-10 11:32:42 +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
Olivier Goffart
5b8917672c Only do the correctId after both the remote and the local have been processed
It is important if there are operations such as delete, which operate on
the remote tree, and thet may also invalidate the id we got on the
localtree (for example, the parent directory of a removed file)
2013-01-10 11:32:27 +01:00
Olivier Goffart
b23d15eb11 csync_tree_walk: let the visitor change the instruction 2013-01-10 11:32:20 +01:00
Olivier Goffart
9998c7cde1 Do not fetch the id in _csync_sync_dir
But rather at then end
2013-01-10 11:28:01 +01:00
Olivier Goffart
0cf1061248 Reduce the number of stat when creating new directory.
Do not do a stat before, it is unlikely that it succeed, and if it does
indeed show there is a file with the same name, the following mkdir ill
fail properly

(The only difference will be that EEXIST will be returned instead of
ENOTDIR
2013-01-10 11:27:52 +01:00
Olivier Goffart
9261f66fd8 Do not fetch the id of new directory in _csync_new_dir
Delay the id update to after when we do all the directory. When we
create ne directory it is likely that there will be something inside.
2013-01-10 11:21:12 +01:00
Olivier Goffart
00ee9f4960 leak fix 2013-01-10 11:18:54 +01:00
Klaas Freitag
96eb138410 Make big file support working for win32. 2013-01-09 15:06:03 +01:00
Klaas Freitag
3d4ba6c29b Write config files after all directories were traversed. 2013-01-09 15:04:17 +01:00
Klaas Freitag
ba21a9b3a2 Check if neon was built with LFS support. 2013-01-09 15:03:20 +01:00
Klaas Freitag
5e4c0acc6b Use wide char variable to remove directory. 2013-01-09 15:02:07 +01:00
Klaas Freitag
c2844b0545 Added csync_get_error_string function to provide backend errors. 2012-12-20 20:47:10 +01:00
Klaas Freitag
70e89720d5 Some code cleanups, removed not needed stuff. 2012-12-20 17:10:03 +01:00
Klaas Freitag
d6287fb5e3 fix win32 build, ifdefed non existing errnos. 2012-12-19 20:20:26 +01:00
Klaas Freitag
a880949836 Display all SSL certificates from the chain to the user to approve. 2012-12-19 18:06:36 +01:00
Klaas Freitag
3343601179 Remove temp files if GET fails, fixes owncloud/mirall#194 2012-12-19 12:41:16 +01:00
Klaas Freitag
e5b95540e7 drop not longer needed case statement. 2012-12-19 12:31:56 +01:00
Klaas Freitag
fe048f69cd Set version to upcoming version 0.70.0 2012-12-18 13:50:56 +01:00
Klaas Freitag
bbf4e07579 Proper errno to csync error conversion, more errno fixes in oC module. 2012-12-17 17:22:24 +01:00
Klaas Freitag
ecf09c4077 Added error_string handling with modules 2012-12-14 16:49:03 +01:00
Klaas Freitag
e3ef10765b Avoid a compile warning. 2012-12-14 16:49:03 +01:00
Olivier Goffart
5bc95e1667 Fix memory leak 2012-12-14 11:19:14 +01:00
Olivier Goffart
89241013c3 Owncloud: Do not use PATH_MAX
We should not limit the size of the buffers to arbitrary values.

Should fix https://github.com/owncloud/mirall/issues/174
2012-12-14 00:14:45 +01:00
Olivier Goffart
1c8dde3b61 owncloud: install the compression hook in sendfile
In some cases (if the local file can't be opened) close will be called
without calling sendfile. That would result in the hook leaking, and
causing crash because it is only unhooked in sendfile.
2012-12-14 00:14:44 +01:00
Olivier Goffart
c09461a9e4 After a move, we also need to refresh the id of the destination folders
Else, the id are not good, and if we move folders like this:
 mv folderA folderB
 csync
 mv folderB folderC
 csync
we want that the first sync refresh correctly the folderB id so that the
second sync do not re-create folderB

When working on the renamed path, we are on the remote tree, but the new
folder is only on the local tree.  hence the 'tree' passed to the helper
function is not the same.
2012-12-14 00:14:44 +01:00
Olivier Goffart
10965eaa98 Fix renaming if the other file already exist on the server.
In that case, we have a conflict.  Handle it the same ways as for new
files.
2012-12-12 14:20:48 +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
Klaas Freitag
654e87a9d5 Fix temp name creation: Place dot correctly for hidden files. 2012-12-12 14:18:30 +01:00
Klaas Freitag
5772021a53 Merge remote-tracking branch 'ogoffart/dav' into dav 2012-12-12 13:37:10 +01:00
Klaas Freitag
ab595a4c8f Add another useful logging line. 2012-12-12 13:36:58 +01:00
Markus Goetz
316fd7b036 Exclude: Tell which file we load 2012-12-11 17:28:37 +01:00
Markus Goetz
fded216fb6 Propagate: Fix file name pattern
Starting with dot on Windows is a bad idea
2012-12-11 17:26:46 +01:00
Klaas Freitag
246e10c403 Up- and download errors are soft errors. 2012-12-11 15:27:00 +01:00
Markus Goetz
bd71ddf0aa Iconv: Also search in /usr on OS X 2012-12-11 14:25:56 +01:00
Daniel Molkentin
fc8ec72371 Fix c&p error 2012-12-11 12:09:51 +01:00
Daniel Molkentin
1507ca2eaf Split download state 2012-12-11 12:09:33 +01:00
Klaas Freitag
8ed89bca86 Hide temp files for download to local. 2012-12-11 11:35:38 +01:00
Klaas Freitag
1705a309b2 Merge remote-tracking branch 'ogoffart/dav' into dav 2012-12-10 21:16:05 +01:00
Klaas Freitag
70a273eafd Do not compile lock test for win32. 2012-12-10 21:15:45 +01:00
Klaas Freitag
faa1b83e9e Fixed rename function to use TCHAR. 2012-12-10 21:15:31 +01:00
Klaas Freitag
128c69676f Added some useful logging for GET 2012-12-10 21:15:08 +01:00
Klaas Freitag
64683332c7 Remove wrong comment. 2012-12-10 20:49:08 +01:00
Markus Goetz
42b090ec0d Propagate: Change temp file name
.. to something already in the exclude list
2012-12-10 19:15:16 +01:00
Markus Goetz
885e073b8a Win32: Hide file while downloading 2012-12-10 19:15:16 +01:00
Olivier Goffart
bac1311486 Don't include "config.h" in the public header.
That file is not installed.  So it makes compiler error when trying to
include csync.h from an external project
2012-12-10 17:03:36 +01:00
Olivier Goffart
01d2586f1e Owncloud: Report the error in the progress callback 2012-12-10 16:51:13 +01:00
Olivier Goffart
8e3331ad1d Suppress a warning
The csync_set_module_property shows a warning if init is not finished
2012-12-10 16:15:26 +01:00
Olivier Goffart
7759eb4b6d Say which function it is in the error messages 2012-12-10 16:15:26 +01:00