Commit graph

2167 commits

Author SHA1 Message Date
Klaas Freitag
cc6c5e0db5 Let function csync_get_status return the CSYNC_STATUS
In original csync, csync_get_status() returned the status variable from
the context, which indicated in which state the sync run currently is,
which is never used.
What we expected in our mirall code however is the CSYNC_STATUS as
detailed result of a certain operation. Changed the function to reflect
that, even if that is an evil API change.
2013-11-24 22:17:36 +01:00
Klaas Freitag
0327461c25 Remove unneeded dlfcn header. 2013-11-21 14:13:35 +01:00
Klaas Freitag
61f08cdd97 Removed some unneeded code. 2013-11-15 16:22:41 +01:00
Klaas Freitag
a1286cc684 Add Content-Type header to http PUT request.
This hopefully fixes bug #1124 as it satisfies the mod_security
settings.
2013-11-15 16:15:26 +01:00
Olivier Goffart
79bf778a42 Forward the should_update_etag to the tree visitor 2013-11-15 13:52:41 +01:00
Olivier Goffart
0c689c4cca Make sure that if two items have the same inodes, they are on the same type.
We don't want to rename a file to a directory
2013-11-15 12:32:05 +01:00
Olivier Goffart
dd24950881 Allow t3.pl to pass with owncloud5
Which do not have fileid
2013-11-15 12:23:05 +01:00
Klaas Freitag
0993289180 Check the remote file Id of files in moved directories. 2013-11-15 09:36:33 +01:00
Klaas Freitag
32533a18af Added function to retrieve file ID from remote. 2013-11-15 09:36:33 +01:00
Olivier Goffart
8a3e617630 Don't put csync_owncloud in a plugin.
It is now statically linked
2013-11-14 18:58:28 +01:00
Olivier Goffart
7e7853f170 Fix t1.pl
Previous commit had the wrong regexp
2013-11-14 18:58:28 +01:00
Olivier Goffart
e0fdad93f4 t4.pl' 2013-11-14 18:20:57 +01:00
Olivier Goffart
415b51b2b5 Some more checks in t1.pl
Notably that the conflict file actually exists.  (There was not even a
conflict before because the filename of the touch was wrong)
2013-11-14 18:03:50 +01:00
Olivier Goffart
4eb19000a4 Differentiate the RENAME and EVAL_RENAME
EVAL_RENAME is set at the update phase and means that this is the destination of
a file that has been renamed.
RENAME is set for the file that need to be renamed.

Before, we knew the difference because of which remote the instruction was
but now we need to make the distinction explicit
2013-11-14 17:08:42 +01:00
Klaas Freitag
bef7c3c48e Fixes to t3.pl, added some assertions. 2013-11-14 17:06:53 +01:00
Klaas Freitag
e40370f67a Use printInfo method in t3.pl 2013-11-14 16:10:41 +01:00
Olivier Goffart
11a131fa90 csync_statedb_query: Allow null fields in the database
The fileid defaults to null for old database.
Since commit 4b8f2a287f,  we query
 the file id to get the etag.
c_strlist_add cannot append null entries, so it would just discard
the md5 instead
2013-11-14 14:41:36 +01:00
Olivier Goffart
4d146e87d1 Remove INVALID_FILE_ID and consider empty file id as invalid 2013-11-14 13:43:26 +01:00
Olivier Goffart
b518adc203 Don't read from the db if the file id has changed.
File id may change when upgrading to owncloud 6 or when upgrading to mirall 1.5

This also changes the location where we check if we need to read from
the DB.   Instead of doing it from csync_ftw,  we do it from
_csync_detect_update. In that function we know the etag and the file id.
Which mean we change the flag before the recursive call to csync_ftw instead
of in the begin of the function.  Therefore, we need to restore the flag
after calling the function to the previously saved state.
2013-11-14 13:43:26 +01:00
Klaas Freitag
6b0b7d1b90 make t1.pl work again. 2013-11-14 13:07:55 +01:00
Klaas Freitag
4b8f2a287f Retrieve file_id together with etag from db if read from db. 2013-11-14 11:32:03 +01:00
Klaas Freitag
3cc2593f62 Handle invalid file_id correctly. 2013-11-14 11:31:30 +01:00
Klaas Freitag
c3e154b2e6 Do not overwrite with an invalid file_id. 2013-11-14 11:30:51 +01:00
Klaas Freitag
e9920bd760 Consider an empty fileid as invalid. 2013-11-13 14:57:34 +01:00
Olivier Goffart
908888a44e Rename 'md5' to 'etag'
'md5' always has been the etag. The name md5 for it is misleading.
It is still called "md5" in the database to keep compatibility
2013-11-13 14:29:31 +01:00
Olivier Goffart
3a1b868348 Directory with different etags should still be moved. 2013-11-13 14:04:51 +01:00
Klaas Freitag
a65c5b6f38 Install Headers of libhttpbf 2013-11-13 09:47:39 +01:00
Klaas Freitag
3714bb02f7 Put files with special char names to tarball and removed them.
Jenkins on rotor.o.o is for some reason not able currently to
work with these file names.
2013-11-11 20:44:31 +01:00
Klaas Freitag
9323658b01 Remove ne_sock_init and ne_sock_exit from owncloud module.
This change, together with a change in mirall calling the two functions
in folderman, should fix https://github.com/owncloud/mirall/issues/1115

This needs to be verified and maybe reverted!
2013-11-11 17:45:19 +01:00
Klaas Freitag
7f10b09a96 Set moved files which are changed to instruction EVAL. 2013-11-11 16:44:21 +01:00
Klaas Freitag
2875d08c16 Record the rename path also for remote renaming. 2013-11-08 11:17:43 +01:00
Klaas Freitag
4ebed84d33 New test: Move a dir remotely, but remove the local one. 2013-11-08 10:18:30 +01:00
Klaas Freitag
586cfa2aac Detect a NEW in the other tree, generate conflict condition. 2013-11-08 10:09:43 +01:00
Klaas Freitag
40e2e5891f Added more tests and info printing. 2013-11-07 16:57:51 +01:00
Klaas Freitag
07e8681181 Added printInfo convenience method. 2013-11-07 16:57:06 +01:00
Klaas Freitag
a6c4a9ac74 Test added: move a directory with a changed file in it. 2013-11-06 16:15:31 +01:00
Klaas Freitag
cac7595afd make createLocalFile to work with absolute path. 2013-11-06 16:14:21 +01:00
Klaas Freitag
97f5bd840e Add a function to calculate the MD5 sum of a file. 2013-11-06 16:13:39 +01:00
Klaas Freitag
cd823524b6 Enable dummy backend again to satisfy tests. 2013-11-06 14:12:31 +01:00
Klaas Freitag
84fa340085 Honor NDEBUG define in test. 2013-11-06 13:42:25 +01:00
Klaas Freitag
d080f7f7a7 Remove stray cat handling. 2013-11-06 13:28:38 +01:00
Klaas Freitag
ee69176a6b Revert "Add straycat handling functions."
This reverts commit 171669c3a4.
This needs to be implemented in a different way.
2013-11-06 13:21:45 +01:00
Klaas Freitag
fc33b5a8ab Fix treewalk test, clean test condition. 2013-11-06 13:13:44 +01:00
Klaas Freitag
bae3d2fc1b Fixed assertLocalAndRemoteDir arguments. 2013-11-06 11:31:51 +01:00
Klaas Freitag
eb33879906 Fix some requirement mentions in the INSTALL file. 2013-11-06 11:29:57 +01:00
Klaas Freitag
63069e4739 New test script for remote renames. 2013-11-06 11:29:57 +01:00
Klaas Freitag
862fffae39 Add more test data. 2013-11-06 11:29:57 +01:00
Klaas Freitag
60c56644ef Changes for more convenient test environment. 2013-11-06 11:29:57 +01:00
Klaas Freitag
95cc4c310b Read all data incl. file_id in get_stat_by_inode. 2013-11-06 11:29:56 +01:00
Klaas Freitag
171669c3a4 Add straycat handling functions. 2013-11-06 11:29:56 +01:00