Commit graph

1432 commits

Author SHA1 Message Date
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
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
b99677f985 Only mark a folder as modified if files within it are modified. 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
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
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
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
79bbbe75d7 Report error to the callback in mkdir and rename 2013-02-12 13:36:17 +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
5a262d7588 Fix crash in owncloud_mkdir
ne_simple_request destroy the request, we cannot access the error code
after it.
2013-02-08 21:06:25 +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
170e5389b3 Do not issue a rename when the file was modified localy 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
77a25eafbb remove wrong comments 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
3793d725a7 avoid double free 2013-02-06 18:40:02 +01:00
Olivier Goffart
77d77ff056 Compile the header with a C++ compiler
template is a keyword in C++
2013-02-06 18:40:02 +01:00
Olivier Goffart
d88c58deae WIP: rename folders 2013-02-06 18:40:02 +01:00
Olivier Goffart
bdd331ee08 Allow to configure the timeout in the config 2013-02-06 18:38:46 +01:00
Olivier Goffart
50dac60bc9 owncloud: fix session cookie again.
Some load balancers may add more cookies, and we would pick the wrong
one.  So keep all the cookies.
If we already read a session cookie, don't parse more cookie as they are
not session cookie.
2013-02-06 12:32:48 +01:00
Klaas Freitag
b7a740d0b3 Switch off unix extensions like the server, see mirall bug #204. 2013-02-05 12:38:40 +01:00
Klaas Freitag
52f33de902 Set version to 0.70.3 plus ChangeLog 2013-01-24 10:39:42 +01:00
Klaas Freitag
4ca84c80c6 Do not limit Cookie detection to PHPSESSID only (mirall#260) 2013-01-24 10:06:42 +01:00
Klaas Freitag
0d6b32ed0a Updated Changelog 2013-01-23 16:03:34 +01:00
Klaas Freitag
460947a3ac Set version to 0.70.2 for release 2013-01-23 14:05:58 +01:00
Klaas Freitag
96f9c09e35 Fix a crash for the case that csync_init fails. 2013-01-22 16:48:36 +01:00
Klaas Freitag
1db825a733 Set path shortcuts for win32 as well. 2013-01-21 13:38:33 +01:00
Olivier Goffart
b7cbd311ba Fix connection with NTLM proxy (should go to dav branch) 2013-01-18 16:28:42 +01:00
Klaas Freitag
82a3e49d82 Bump version to 0.70.1 for oCC 1.2.0 beta2 2013-01-16 16:37:09 +01:00
Klaas Freitag
ccc9419a58 Reduce the sqlite_compile errors dramatically. 2013-01-16 16:27:59 +01:00
Klaas Freitag
21379de9c3 Fixed comment and initialized errno for stat. 2013-01-16 16:25:51 +01:00
Klaas Freitag
5b1a9d8ed8 Handle 405 status code in mkdir correct as EEXIST. 2013-01-16 13:48:52 +01:00
Klaas Freitag
e83cc82f0d remove a duplicate void'ing. 2013-01-16 13:47:41 +01:00
Klaas Freitag
0752aff55a Handle 405 as EPERM rather than EEXIST 2013-01-16 11:42:13 +01:00
Klaas Freitag
23fe05604b Added new error types for service unavail, quoto and file too big. 2013-01-13 21:39:54 +01:00
Olivier Goffart
3b4b500d4f leak fix 2013-01-10 11:32:42 +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
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