Commit graph

178 commits

Author SHA1 Message Date
Olivier Goffart
3d2c3b321c Disable the blacklist by default
The blacklist might hide errors and reduce the ability to do proper
diagnostics.

Note that in _csync_push_file, we kept csync_statedb_get_progressinfo
because it is also used for the resume feature

Also added output when a file has been blacklisted.
2013-06-18 19:19:28 +02:00
Olivier Goffart
882e027e40 Remove dead condition
rc==123 was a magic value set to mean not to save the error. But after
some refactoring, it is not done like that anymore
2013-06-07 16:43:48 +02:00
Daniel Molkentin
5a2d7e9c9f Do not corrupt ctx->replica value if push_file fails 2013-06-07 14:58:38 +02:00
Klaas Freitag
d9ef991448 Removed unused progress info allocation. 2013-06-07 09:18:27 +02:00
Klaas Freitag
02f93ec4d5 Free allocted memory of local and remote list. 2013-05-22 12:33:09 +02:00
Klaas Freitag
dd8ceacf75 Avoid compile warning due to non-top variable declaration. 2013-05-22 12:33:09 +02:00
Klaas Freitag
4f47aba1e2 Allow user aborting in chunked uploads 2013-05-16 17:37:30 +02:00
Klaas Freitag
1a648a612e Merge remote-tracking branch 'ogoffart/rename_folders_merged' into dav 2013-05-13 16:28:31 +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
0b648dc669 Do not fetch folder id after propagation.
Delay that for the next sync.
2013-05-03 19:21:21 +02:00
Klaas Freitag
a1271a1db2 Rather store a ptr to the ptr to st for propagation_cleanup 2013-04-26 10:31:41 +02:00
Olivier Goffart
844c2bbafa Avoid double free 2013-04-24 14:53:31 +02:00
Klaas Freitag
374d9b0a8c Merge from feature branch csync_commit. 2013-04-22 15:39:43 +02:00
Klaas Freitag
64927899af Use pointer to stat struct for id_list. 2013-04-22 10:22:20 +02:00
Klaas Freitag
84febf4b77 Merge branch 'dav_0.70.5' into dav 2013-04-15 15:37:17 +02:00
Klaas Freitag
7171da53e8 Check that file is unchanged before copying in propagator. 2013-04-09 16:43:21 +02:00
Klaas Freitag
093b166319 Rename pi to progress_info. 2013-04-04 12:58:29 +02:00
Klaas Freitag
815f652f08 Move tmpname generation to utility function c_tmpname for cleander code. 2013-04-04 12:57:44 +02:00
Olivier Goffart
9939e325cf Fix crash when setting a NULL error 2013-04-03 10:53:20 +02:00
Olivier Goffart
296011436a Store the error string in the database when blacklisting 2013-03-28 13:54:01 +01:00
Olivier Goffart
6659ee6d76 store the error string for files in the tree 2013-03-28 13:54:01 +01:00
Klaas Freitag
79c51540da Check for file equalness after having created a conflict file.
If the files are equal and the conflict was created because the
timestamps were screwed the conflict is removed again. This only
works on the local repository so far.

Conflicts:
	src/csync_propagate.c
2013-03-26 11:57:32 +01:00
Klaas Freitag
43fa6e4418 Check for file equalness after having created a conflict file.
If the files are equal and the conflict was created because the
timestamps were screwed the conflict is removed again. This only
works on the local repository so far.
2013-03-22 21:04:09 +01:00
Klaas Freitag
f88e9baf15 Handle renames in read only shares correctly. 2013-03-19 14:18:34 +01:00
Klaas Freitag
7630ab5807 Moved variable declaration. 2013-03-14 13:41:27 +01:00
Klaas Freitag
c263532ba3 Merge remote-tracking branch 'ogoffart/davbf' into dav 2013-03-14 13:36:55 +01:00
Olivier Goffart
2205c9a339 Resume chunked upload if conneciton is lost 2013-03-12 11:42:17 +01:00
Olivier Goffart
b4ec9f887c Do not fetch folder id after propagation.
Delay that for the next sync.

(cherry picked from commit 1eb534dd53)
2013-03-11 20:38:17 +01:00
Olivier Goffart
6a5ad6e81e Revert "Do not fetch folder id after propagation."
This reverts commit 1eb534dd53.

Because folder re-appears in some cases
(IL issue #143)
2013-03-08 17:47:39 +01:00
Olivier Goffart
e05b44b06d Fix blacklist with renamed files
When renaming blacklisted files, we still need to find the other node to
mark the error
2013-03-07 11:07:38 +01:00
Klaas Freitag
47b1e64059 Handle renames in read only shares correctly. 2013-03-06 16:00:28 +01:00
Olivier Goffart
1eb534dd53 Do not fetch folder id after propagation.
Delay that for the next sync.
2013-03-05 20:33:18 +01:00
Olivier Goffart
d6a6fb0d67 Keep the tmp file and resume from it 2013-03-02 15:02:27 +01:00
Olivier Goffart
53ad4a910f Progress database:
Remember about errors, and don't retry if there is more than 3 errors

Conflicts:
	src/csync_propagate.c
2013-03-02 15:01:40 +01:00
Olivier Goffart
259b6050bf Progress database:
Remember about errors, and don't retry if there is more than 3 errors
2013-03-01 12:31:20 +01:00
Olivier Goffart
355a807775 Fix removing of folder when the folder is locked on windows.
When the folder is locked on windows, rmdir fails and the folmder is not
removed.  But on the next sync, one should try to remove that folder again, and
not upload it to the server as we did before.

There was two problems:

1- The removed folder is still in the DB, so when csync_update read from
DB, for the remote, it still finds it.  Fix that by storing an empty MD5
for directories that should have been deleted.

2- The folder is likely to be modified since its contents are gone.
Which means next sync will try to sync it back to the server.
Fix that by refreshing the mtime in the tree
2013-02-25 11:32:32 +01:00
Olivier Goffart
ca34c4fd5f Fix removing of folder when the folder is locked on windows.
When the folder is locked on windows, rmdir fails and the folmder is not
removed.  But on the next sync, one should try to remove that folder again, and
not upload it to the server as we did before.

There was two problems:

1- The removed folder is still in the DB, so when csync_update read from
DB, for the remote, it still finds it.  Fix that by storing an empty MD5
for directories that should have been deleted.

2- The folder is likely to be modified since its contents are gone.
Which means next sync will try to sync it back to the server.
Fix that by refreshing the mtime in the tree
2013-02-13 19:20:26 +01:00
Olivier Goffart
b028c64325 In case of error dirring a rename, mark the source as updated
That way, the file will be saved in the DB again, and the next try, it
will retry to rename
2013-02-12 15:11:15 +01:00
Olivier Goffart
8646246e75 Also report the error for the other node in case of error 2013-02-08 21:51:03 +01:00
Olivier Goffart
2615205adc Fix renaming folder when a file was modified by another client 2013-02-06 18:40:03 +01:00
Olivier Goffart
71caa3356c Automatically creates the destination folder if it does not exist 2013-02-06 18:40:02 +01:00
Olivier Goffart
0cf770017d Do not abort when move fail 2013-02-06 18:40:02 +01:00
Olivier Goffart
fe756799d2 Make it work when renaming a directory and a subdirectory at the same
time
2013-02-06 18:40:02 +01:00
Olivier Goffart
0c874f0c3c fix some issues while moving. Now it works in simple cases 2013-02-06 18:40:02 +01:00
Olivier Goffart
d88c58deae WIP: rename folders 2013-02-06 18:40:02 +01:00
Klaas Freitag
0752aff55a Handle 405 as EPERM rather than EEXIST 2013-01-16 11:42:13 +01:00
Olivier Goffart
de87ed2d31 Make it a error when the file cannot be created
Mark it a an error when the file cannot be created because the folder
cannot be created.

Should display errors on windows if the file is too long
2013-01-10 11:32:42 +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
9998c7cde1 Do not fetch the id in _csync_sync_dir
But rather at then end
2013-01-10 11:28:01 +01:00