Commit graph

543 commits

Author SHA1 Message Date
Klaas Freitag
e0abbc0b83 vio_local: Properly detect if files are hidden.
On Linux and Mac, check for the leading dot. On Windows,
there is an flag set in the result struct of fetFileInformationByHandle.
2015-07-15 15:20:46 +02:00
Markus Goetz
cd64d3ae2c CSync: Split csync_vio_local.c
This is to make room for further improvements #880
2015-07-13 15:54:09 +02:00
Olivier Goffart
45180a024d Rename should_update_etag to should_update_metadata
This should avoid some confusion
2015-07-09 15:05:37 +02:00
Klaas Freitag
7f628e6f7e c_path: Fix function description. 2015-07-08 18:13:41 +02:00
Klaas Freitag
a076a170ee vio_local: strncat only needs two chars as limit. 2015-07-08 18:13:41 +02:00
Klaas Freitag
ccc91a52a8 vio_local: Give strncpy and strncat enough space to copy closing zero. 2015-07-08 18:13:41 +02:00
Klaas Freitag
4cb78999d2 vio_local: Simplify and fix the error out behaviour of win32 impl.
This avoids leaking of a stat struct in error case.
2015-07-08 18:13:41 +02:00
Klaas Freitag
1a69e2ae8d vio_local: Remove commented code. 2015-07-08 18:13:41 +02:00
Klaas Freitag
c7ba7c8e9f Fix comment for c_path_to_UNC, plus cleanup of superflous debug. 2015-07-08 18:13:41 +02:00
Klaas Freitag
8bb1a49aaf Use strncat and strncpy rather than the strcpy and friends. 2015-07-08 18:13:40 +02:00
Klaas Freitag
d303df7fa0 do not use the path function here. 2015-07-08 18:13:40 +02:00
Klaas Freitag
a280007dc2 Added another test case with content in the deep path (also win32). 2015-07-08 18:13:40 +02:00
Klaas Freitag
d9b44b3a69 Created two functions c_utf8_string_to_locale and c_utf8_path_to_locale.
Before we only had c_utf8_to_locale, but now functionality is needed to
convert a path to UNC before converting it. That does c_utf8_path_to_locale
now, while c_utf8_string_to_locale only converts the plain string, ie.
to generate wide char strings for output.
2015-07-08 18:13:39 +02:00
Klaas Freitag
5214189eb2 Moved the makeWinLongPath function to c_path and rename to c_path_to_UNC
Other cleanups like streamlined allocation and more.
2015-07-08 18:13:39 +02:00
Klaas Freitag
3aed7fc0be Removed dead code from csync_utils. Functionality moved to Qt based code. 2015-07-08 18:13:39 +02:00
Klaas Freitag
2e04eba74b Long Win Pathes: Added test to test dir traversal with long pathes. 2015-07-08 18:13:39 +02:00
Klaas Freitag
2cce8065ab CMocka Testing: Install the cmocka library 2015-07-08 18:13:39 +02:00
Klaas Freitag
8183c37dfe long win pathes: Some minor refinements and documentations 2015-07-08 18:13:39 +02:00
Klaas Freitag
f98af43d31 Add cross platform definition for chdir and getcwd. 2015-07-08 18:13:39 +02:00
Klaas Freitag
b9b5e1cf33 Long win pathes: Make makeLongWinPath function return the num of alloc bytes.
This enables the calling function to free these accordingly. That is needed
because the makeLongWinPath for efficiency reasons does not always realloc
the original string.
2015-07-08 18:13:39 +02:00
Klaas Freitag
2b391396c6 vio local: Use win32 native functions to traverse the file tree.
Native functions to replace the not native readdir and opendir functions.
This works with long filenames now.
2015-07-08 18:13:39 +02:00
Klaas Freitag
5caff8cc93 Add a FIXME comment. 2015-07-08 18:13:39 +02:00
Klaas Freitag
599ee90500 Remove definition of TDIR, its not longer in use.
The directory traverse handle struct is platform dependant now.
2015-07-08 18:13:39 +02:00
Klaas Freitag
2f0a404116 Unit test for the long filename conversion on win32 2015-07-08 18:13:38 +02:00
Klaas Freitag
472eed7f20 Added function to change the filename to be longer than MAX_PATH 2015-07-08 18:13:38 +02:00
Klaas Freitag
7d2bb261dc Removed the setFileHidden function for now 2015-07-08 18:13:38 +02:00
Christian Kamm
e88ce41f4f test: Fix compile of check_csync_update. 2015-07-02 10:04:20 +02:00
Olivier Goffart
575ca50aac csync: Do not ignore hard links anymore
There is no reason to ignore them. Downloading a file that is hardlinked
will break the link.

Will solve syncing NTFS directories #3241
2015-07-01 13:05:08 +02:00
Olivier Goffart
84fdc8c6c0 Merge remote-tracking branch 'origin/1.8' 2015-06-26 17:54:35 +02:00
Olivier Goffart
516509b4ed csync_statedb: fix leak
Spotted by coverity (CID 98061)
2015-06-26 17:01:43 +02:00
Olivier Goffart
29fecb029e Merge remote-tracking branch 'origin/1.8'
Conflicts:
	VERSION.cmake
        src/gui/accountsettings.cpp
	src/gui/accountsettings.h
2015-06-25 12:30:52 +02:00
Christian Kamm
f130a2716e Update: Check exclusion when reading from db. #3172 2015-06-19 14:58:47 +02:00
Christian Kamm
5f44218727 Reconcile: Update db entry for new dirs. #2761
Previously a EVAL_RENAME that was changed to NEW could end up
being propagated but not added to the database.
2015-06-17 11:53:38 +02:00
Klaas Freitag
758a820b0c csync: only define S_ defines if they are undefined. 2015-06-15 14:55:02 +02:00
Olivier Goffart
16786eed54 Merge pull request #3281 from owncloud/confirm
Confirm feature (sync engine part only)
2015-06-10 13:39:52 +02:00
Olivier Goffart
e135d4cccf Merge remote-tracking branch 'origin/1.8' 2015-06-10 13:42:02 +02:00
Olivier Goffart
5dcb276376 csync: fix a few possible leak in error cases 2015-06-08 15:31:14 +02:00
Christian Kamm
e04882cc7c Discovery: Ignore folders with any 503. #3113 2015-06-04 09:24:53 +02:00
Olivier Goffart
7bb2834d8b Confirm feature (The sync engine part) 2015-05-26 12:34:07 +02:00
Olivier Goffart
289800c1ba Recall: make it work even if it is not in the root directory 2015-05-21 16:06:53 +02:00
Olivier Goffart
49fb37fefc t_recall.pl: add a test for the recall feature 2015-05-21 16:06:53 +02:00
Olivier Goffart
6a7f2089e8 tests: Make them more verbose in case of failures 2015-05-20 14:34:11 +02:00
Markus Goetz
6b16e18eb8 tx.pl: Use HTTP Keep-Alive 2015-05-12 17:11:21 +02:00
Olivier Goffart
505dba5b23 csync walk tree: Try to find the 'other_node' in the source directory in case of renames
This fixes t2.pl
2015-05-12 16:32:00 +02:00
Markus Goetz
625e61516f Propagator: Limit length of temporary file name #2789 (fixup)
Fix 22c35c4d15
2015-05-11 15:42:35 +02:00
Hefee
23b6426dfa Compile with GCC 5
this fixes the error and makes complete oCC compile with GCC 5.
error: ISO C does not support '__FUNCTION__' predefined identifier
[-Wpedantic]

According to the porting guide:
The fix is either to use the standard predefined identifier __func__
(since C99), or to use the __extension__ keyword.
2015-05-07 01:15:55 +02:00
Daniel Molkentin
d8275cd4e1 Use identical User Agents for csync and the Qt parts
Also, use the mirall version for ocsync.

Currently, the csync engine part and the Qt part have different UAs,
and this makes debugging (i.e. reading access logs) difficult. On
top, we haven't increased the ocsync version number in ages. So
as a consequence, I think it would be the best to have ocsync
and the rest share the same version number, and make them identify
with the same user agent.

To ease debugging for our side, we'll still append "(csyncoC)"
for calls made by csync.
2015-04-16 20:58:51 +02:00
Markus Goetz
fa80a006b8 CSync: Log if file_id is too long 2015-04-13 14:58:25 +02:00
Olivier Goffart
c917251e9e Reconcile: Fix clang warning
csync_reconcile.c:159:26: warning: address of array 'tmp->path' will always evaluate to 'true' [-Wpointer-bool-conversion]
                if( tmp->path ) {
                ~~  ~~~~~^~~~

csync_file_stat_s::path is an array so it is never null
What was meant here is to check if the string was not empty
2015-04-09 15:06:48 +02:00
Christian Kamm
adcf40afc3 Discovery: Speed up initial run. #2796 2015-04-08 15:43:49 +02:00
Jocelyn Turcotte
d475628c70 SyncEngine: Fix a crash in csync_vio_file_stat_copy #3051
In some cryptic cases where the getetag property wasn't returned by
the server, we might be trying to c_strdup a null pointer in
csync_vio_file_stat_copy.

At least avoid crashing in this case by looking for
CSYNC_VIO_FILE_STAT_FIELDS_ETAG, like csync_vio_file_stat_destroy
does.
2015-04-08 09:35:43 +02:00
Daniel Molkentin
14e0e4a072 Win32: More reserved file names to ignore, including Recycle Bin
Addresses #2955
2015-03-12 16:25:32 +01:00
Markus Goetz
fe574dbbf9 Discovery: Free some memory before propagate (#2902) 2015-03-02 15:08:21 +01:00
Christian Kamm
b03209ccef Inform user about ignored long files. #2882 2015-02-27 12:12:39 +01:00
Klaas Freitag
4f7c062f3f csync_exclude: Ignore files where the filename length is > 254 chars.
This is for example HFS+ and others. It fixes #2882
2015-02-26 17:09:49 +01:00
Christian Kamm
76ac628153 Discovery: Distinguish 503 Storage not available. #2884 2015-02-25 12:02:10 +01:00
Klaas Freitag
3af936c8a1 Some minor cleanups. 2015-02-24 22:02:29 +01:00
Klaas Freitag
d297580d26 Tests: Fix compile if NEON is absent. 2015-02-13 10:04:28 +01:00
Olivier Goffart
2a88f5083c t6.pl: Add a test that re-upload a chunked file with lot of chunks 2015-02-06 10:23:20 +01:00
Olivier Goffart
5ec793e045 propagateupload: Save the mtime given by the server in the reply to GET
There could be a race condition if the file was updated on the server
between the discovery and the propagate phase. By taking the mtime from
the server, we make sure that we do not have a race.

This is tested by t6.pl with BIG3.file because the script was modifying
the file between the two phases
2015-02-06 10:23:20 +01:00
Daniel Molkentin
59bdda6226 Require OpenSSL > 1.0.0, remove obsolete dep from csync 2015-02-05 13:08:28 +01:00
Jocelyn Turcotte
1ac523ec01 Output libocsync and libowncloudsync in the bin directory
Windows finds DLLs using PATH or the directory of the process'
executable. By outputing those dependend DLLs together with
owncloud.exe, the developer only need to have OpenSSL's bin
and the qtkeychain build directory in his PATH to let the
dynamic linker find them.

As the documentation of RUNTIME_OUTPUT_DIRECTORY points out,
this only affects windows as other platforms don't consider
libraries as runtime targets.
2015-02-04 15:00:22 +01:00
Jocelyn Turcotte
43a51c1bef Fix the MinGW build
- qtkeychain isn't necessarily in a qt5keychain subdirectory.
- Explicitly add OpenSSL to the include directories
- Make sure that the USE_OUR_OWN_SQLITE3 code is initialized
  for csync by calling find_package.
2015-02-04 14:50:38 +01:00
Olivier Goffart
52d330d8e5 csync: add neon include directories 2015-02-03 16:00:55 +01:00
Christian Kamm
43d6dbb0f2 SQL: Add debugging options. #2693
OWNCLOUD_SQLITE_JOURNAL_MODE: To use something else than WAL
OWNCLOUD_SQLITE_TEMP_STORE: To test with storing temporaries in memory.
2015-01-29 11:02:01 +01:00
Olivier Goffart
22d3a4a48f csync_owncloud: don't deref null pointer 2015-01-28 14:16:33 +01:00
Olivier Goffart
d70e146c1f Merge remote-tracking branch 'origin/ssl_client_cert'
Conflicts:
	CMakeLists.txt
	csync/src/CMakeLists.txt
	csync/src/csync_owncloud.c
2015-01-28 14:13:40 +01:00
Daniel Molkentin
989005d616 Clientcert support: Explictly link libsync against openssl 2015-01-28 13:31:17 +01:00
Joachim Schiele
9abc3e1333 fixes required by upstream 2015-01-23 19:22:56 +00:00
Olivier Goffart
502e7081cf Make it compile with neon 2015-01-23 17:59:07 +01:00
Olivier Goffart
dcba129a98 Make it compile without neon 2015-01-23 17:56:46 +01:00
Olivier Goffart
b856266e91 Remove neon link flag when not required 2015-01-23 17:35:17 +01:00
Markus Goetz
7f1f62e14a CSync: Clean some more 2015-01-23 17:26:30 +01:00
Olivier Goffart
fe51ada1e8 Don't require NEON with Qt 5.4 2015-01-23 17:11:34 +01:00
Markus Goetz
6708c959d9 CSync: Remove c_list 2015-01-23 17:09:13 +01:00
Markus Goetz
af9daaeff7 CSync: Remove memory checks
We will get OOMed before this fails.
2015-01-23 16:59:51 +01:00
Markus Goetz
c9f9d55658 Merge branch 'qnam_csync_update'
Conflicts:
	src/libsync/networkjobs.cpp
2015-01-22 14:34:36 +01:00
Nourredine
ba8b1bbe06 adds 'SSL client certificate' support from n.octeau with qknight changes as:
* removed broken QSsl::SslV3 default
* rewrote slotHandleErrors(): no longer claim errors which are none.
* hack reverted: lib64 was not the cause for NixOS issues related to libraries.
* refactored csync/src/csync_owncloud.c and discovered+fixed why the dav_connect was never getting the certPath+certPassoword
* cleanup of code but seems this crushed the ssl client certificate support
* fixes the https://github.com/owncloud/client/issues/69#issuecomment-69358377 issue
* lots of cleanup
* From TODO list : translate all french comments into english
* changed _pemCertificate type from QString to QByteArray
2015-01-21 23:55:11 +00:00
Olivier Goffart
08043bed21 csync_update: Leave a margin of 1sec when comparing the time for the timezone changes
Because FAT has a bad resolution, when the timezone is changed, there may be
one second of difference.

Issue #2438
2015-01-20 18:34:24 +01:00
Markus Goetz
906779c4b1 SyncEngine: Use QNAM for csync_update
This is for #2507
2015-01-20 18:27:25 +01:00
Olivier Goffart
264471af43 csync: cleanup some unused error code 2015-01-15 12:19:06 +01:00
Olivier Goffart
e31514f769 csync propfind: Rename the directDownload property
The owncloud server has a different name because if it was named the same
it would break the 1.7 client

Issue #2614
2015-01-15 11:52:55 +01:00
Olivier Goffart
08d3ae9f02 csync_statedb: Have more granular error reporting when the loaddb fails
In order to distiguish error from sqlite_open or from the integrity check

Issue #2673
2015-01-15 11:36:24 +01:00
Christian Kamm
9b7e6cc5c1 Fix warnings.
* remove Unused variable
* zorder for spacers makes no sense
2015-01-14 11:28:53 +01:00
Olivier Goffart
a2803e4f5f csync_update: do not force writing on the db for directory with a changed date
Fixes #2584
2014-12-16 13:02:32 +01:00
Christian Kamm
53d5de685c Merge remote-tracking branch 'origin/1.7'
Conflicts:
	src/gui/folder.cpp
	src/gui/folder.h
	src/libsync/networkjobs.cpp
	src/libsync/owncloudpropagator.h
	src/libsync/propagatedownload.cpp
2014-12-10 13:01:36 +01:00
Klaas Freitag
133a8ec225 Added a fixme for an edge case detected by QuickCheck. 2014-12-09 17:02:51 +01:00
Daniel Molkentin
3016844dd7 Merge branch 'master' into rename_client
Conflicts:
	README.md
	src/gui/folderman.cpp
	src/gui/settingsdialog.cpp
	src/libsync/accessmanager.cpp
	src/libsync/propagateupload.h
2014-12-02 13:37:22 +01:00
Olivier Goffart
512492bf30 Merge remote-tracking branch 'origin/1.7'
Conflicts:
	src/libsync/propagatedownload.cpp
2014-12-01 14:37:47 +01:00
Olivier Goffart
2477c3914e csync_update: Ignore a difference of time of exactly one hour
Issue #2438
2014-12-01 13:53:30 +01:00
Klaas Freitag
3e34d000f2 Propagator: Add the chunk size to PUT requests. 2014-11-25 10:21:33 +01:00
Daniel Molkentin
058d868edd Merge remote-tracking branch 'origin/1.7' 2014-11-12 00:09:00 +01:00
Daniel Molkentin
281c0e1553 Merge branch 'master' into rename_client
Conflicts:
	CMakeLists.txt
	src/gui/main.cpp
	src/libsync/accessmanager.cpp
	src/libsync/accessmanager.h
	src/libsync/owncloudpropagator_p.h
2014-11-12 00:07:59 +01:00
Olivier Goffart
b04cb23ed5 t8.pl: fix the test for me
On localhost, the other file (the bigger one) was downloaded first
2014-11-11 16:38:20 +01:00
Olivier Goffart
7b4be209aa MOVE: fix moving with special character.
The Destination header need to be %-encoded
2014-11-11 16:27:06 +01:00
Daniel Molkentin
b54c079766 Adjust issue urls 2014-11-09 23:38:07 +01:00
Olivier Goffart
de11f602d5 Merge remote-tracking branch 'origin/il'
Conflicts:
	csync/src/csync_private.h
	src/CMakeLists.txt
	src/gui/folder.cpp
	src/libsync/owncloudpropagator.cpp
	src/libsync/owncloudpropagator.h
	src/libsync/propagator_qnam.cpp
	src/libsync/propagator_qnam.h
	src/libsync/syncengine.cpp
	src/libsync/syncengine.h
	src/mirall/syncjournaldb.cpp
2014-11-08 10:48:36 +01:00
Daniel Molkentin
f25d175b5d Merge remote-tracking branch 'origin/1.7' 2014-11-06 19:54:20 +01:00
Christian Kamm
eed91ddf46 Legacy propagator: Don't use mtime retrieved via _fstat64.
May be the cause of #2431
2014-11-06 12:16:55 +01:00
Christian Kamm
45eeb5065f Download: Avoid overwriting file with case conflict. #1914 2014-10-30 09:06:53 +01:00
Klaas Freitag
1029f9521c tests: exit t5.pl if running against ownCloud 6
t5.pl checks the environment variable SERVER_VERSION and if that equals
"owncloud6" it bails out after a check of the sharing ocs api.
2014-10-29 14:24:36 +01:00
Klaas Freitag
825eca078d tests: make t1.pl work on jenkins, for that disable a size compare. 2014-10-29 14:01:58 +01:00
Christian Kamm
4e20a02fe5 SyncJournalDB: Add filesize column to metadata.
* Alter table to include column.
* Make get/set in SyncJournalDB store and load it.
* Make csync recover the stat_t's size member from it.
2014-10-29 09:53:36 +01:00
Klaas Freitag
0692fea9d8 discovery: handle 503 reply code from server for directories
503 for directories means that the dir is a mounted directory from an
external mount which currently is not available. The directory is
ignored and not traversed into during discovery phase.
2014-10-27 19:21:12 +01:00
Daniel Molkentin
d76192cce1 Ignore reserved words on Windows
Fixes #2385 and #2386
2014-10-24 13:18:57 -04:00
Klaas Freitag
114c38c1ff csync tests: add some debug code to get behind the jenkins fails. 2014-10-23 17:33:47 +02:00
Olivier Goffart
dab01e3f3f csync_update: add the perms in the log 2014-10-22 17:25:38 +02:00
Klaas Freitag
9f6d7eb587 tests: use the ocs_url in the same semantics as the 1.6 branch. 2014-10-22 16:06:39 +02:00
Markus Goetz
47ad4e3fe8 CSync: Close/Reopen DB between update and reconcile
update and reconcile happen in different threads. This code is safer.
(Even though depending on sqlite3 version it should work anyway)
2014-10-22 15:42:13 +02:00
Olivier Goffart
3be5600caf t6.pl: fix missing space in curl command 2014-10-22 15:16:22 +02:00
Olivier Goffart
dd45b448d9 t6.pl: pass the --insecure flag to curl so it works on the test machine 2014-10-22 13:57:22 +02:00
Christian Kamm
d77fcea365 Csync tests: Don't use sqlite3_close_v2. 2014-10-22 12:44:33 +02:00
Christian Kamm
ba86988101 Csync tests: Fix broken tests.
It is no longer ok to call csync_statedb_load() on a non-existant
database since it opens readonly only.
2014-10-22 12:22:13 +02:00
Christian Kamm
de48e65091 Csync tests: Fix compile. 2014-10-22 11:45:48 +02:00
Markus Goetz
61e72ef50b CSync: statedb sanity check changes 2014-10-21 18:09:23 +02:00
Markus Goetz
24d4840c93 SyncJournalDB: Set WAL files to hidden 2014-10-21 15:58:56 +02:00
Olivier Goffart
5a109d9293 Fix t3.pl
The fix in commit 86d8079 made the detection of changes inside
a directory more robust.
As a result, changes are detected inside a directory, even if the
files that are changed were moved away on the other remote, the algorithm
won't let the directory be removed and the directory will be re-created
2014-10-21 12:10:12 +02:00
Olivier Goffart
56316bc980 csync_reconcile: remove useless debug output 2014-10-21 11:47:18 +02:00
Klaas Freitag
21c8e65d13 csync tests: Fix test after db changes. 2014-10-21 11:26:04 +02:00
Olivier Goffart
86d8079739 Reconcile: Make sure not to loose new files added in a directory removed on the server
Found while investigating #2296

The problem is that we should not remove a directory locally if it contains
modified files.
But the modification time of the directory is not necessarily chaning (so
the instruction of the directory may still be NONE)

We have to move the child_modified test a bit down to be recursive
2014-10-21 10:38:21 +02:00
Markus Goetz
5d048c18bc Sqlite3: Switch to WAL
This is faster.
2014-10-20 23:09:28 +02:00
Markus Goetz
0fb779d363 SyncEngine: De-initialize recursive PROPFIND value correctly 2014-10-20 22:24:28 +02:00
Markus Goetz
d33b68ccc9 CSync: Error out if DB error 2014-10-20 19:32:06 +02:00
Klaas Freitag
b5736fb5a7 Sql: Handle SQLITE_BUSY properly for sqlite3_step and sqlite3_prepare.
Repeat the statements a couple of times and sleep in between.
2014-10-18 16:16:29 +02:00
Klaas Freitag
7822a6b000 csync_statedb: Finalize the precompiled statements after discovery.
As described in http://www.sqlite.org/cvstrac/wiki?p=MultiThreading precompiled
statements should not be used across thread borders. However, the reconcile
phase would reuse the statements if defined (it calls statedb function from
a different thread) so it is saver to finalize them at the end of the
update run.
2014-10-18 14:18:11 +02:00
Olivier Goffart
a5bd437d48 Propagator: Fix renaming of files and case confflicts
Better fix for #1385 and #2318
2014-10-17 16:15:03 +02:00
Markus Goetz
1d5b3aadea sqlite3: Bundle 3.8.6 for Mac and Windows
it is linked into ocsync.
2014-10-16 17:38:45 +02:00
Klaas Freitag
6c92076ec3 tx.pl: Adopt test t6.pl to the new way of handling precondition failed. 2014-10-15 19:25:34 +02:00
Klaas Freitag
74ec90c725 tx.pl: Fix sharing api url, some whitespace fixes. 2014-10-15 13:28:53 +02:00
Markus Goetz
b285e98988 SQlite: Print versions we use 2014-10-11 17:33:35 +02:00
Olivier Goffart
7e898cf60c SelectiveSync: rename blacklist to selectiveSyncBlackList in some places
Issue #2301
2014-10-11 16:24:45 +02:00
Klaas Freitag
2f5cea0e73 owncloudcmd: Add a custom ssl verification callback for neon.
That fixes the SSL related problems we had with ci.owncloud.org
2014-10-11 15:55:37 +02:00
Markus Goetz
75dbf12ae6 CSync: Remove dead code 2014-10-10 11:44:40 +02:00
Olivier Goffart
661fe5df66 csync_statedb: fix inverted logic in testing if the sqlite was compiled with threads 2014-10-10 10:12:54 +02:00
Klaas Freitag
61967f6e1b csync tests: conform to read only db. 2014-10-09 17:45:20 +02:00
Klaas Freitag
edf7cd29dd csync statedb: Set PRAGMA synchronous to NORMAL for read only db. 2014-10-09 10:05:20 +02:00
Klaas Freitag
27318dded6 csync statedb: Issue a warning if sqlite is not compiled thread safe. 2014-10-09 10:05:20 +02:00
Klaas Freitag
11fe0c5b4b csync statedb: Open the statedb in read only mode and with mutex set.
For that, sqlite3_open_v2 is used with the appropiate flags.
2014-10-09 10:05:20 +02:00
Klaas Freitag
6c2ce06fea tx.pl: Set the SSL relaxing env variable. 2014-10-03 10:33:30 +02:00
Olivier Goffart
fe1653ede6 csync_update: don't recurse into ignored directory.
This save some time when selective sync deselected a large tree
2014-09-26 12:35:56 +02:00
Markus Goetz
6d94acee8f permissions: Fix root properties if no permissions used 2014-09-25 10:24:51 +02:00
Klaas Freitag
2e12acdf32 doc: add a memo about the issue that defines the permission flags. 2014-09-24 16:35:50 +02:00
Christian Kamm
eb1b17e8e4 CSync tests: Add t1.cfg to gitignore. 2014-09-19 14:21:14 +02:00
Olivier Goffart
1cd5681967 permissions: Remember the permissions for the root folder 2014-09-19 10:58:52 +02:00
Klaas Freitag
fc36e7eccf tests: Add a csync exclude test to check toplevel excludes. 2014-09-18 15:34:24 +02:00
Klaas Freitag
0cc2bbf5d9 csync exclude: Export the csync_exclude_add function in debug mode 2014-09-18 15:34:24 +02:00
Christian Kamm
a88ac00115 SyncEngine: Better reporting when ignoring hardlinks. #2217
Also touch csync to actually let us know it's ignoring the file
due to it having hard links.
2014-09-18 11:32:29 +02:00
Christian Kamm
0bd73788f4 Doc: Update csync test script README. 2014-09-17 16:18:55 +02:00
Olivier Goffart
292a7357bd t1.cfg.in: saner placeholder executable name
Now it is owncloudcmd and not csync
2014-09-17 14:39:34 +02:00
Christian Kamm
0eb9401c62 File change detection: Also look at file sizes.
See #2167 and #2169.

* csync_detect_update: Reupload a file if the sizes differ, similar
  to how we reupload if the mtimes differ.
* PropagateUploadFileQNAM::slotPutFinished(): Abort an upload if the
  size changed, similar to how we abort an upload if the mtimes changed.
2014-09-17 09:05:13 +02:00
Olivier Goffart
a4dbf5942c owncloudcmd: restart the sync if required
Fixes #2038
2014-09-12 17:23:01 +02:00
Olivier Goffart
76f0f3cbf2 csync_vio_local on windows: fix overflow when computing the size of file > 4GiB
MAXDWORD is 0xFFFFFFFF, so if we add one, it overflows and is 0.
We need to cast it to 64 bits before
2014-09-11 11:10:58 +02:00
Daniel Molkentin
2dfbc2058f Win32: ignore files ending in '.' or at least one space
Fixes #416
Fixes #2176
2014-09-10 15:21:19 +02:00
Olivier Goffart
79ee6c2f3b csync_vio_local on windows: fix overflow when computing the size of file > 4GiB
MAXDWORD is 0xFFFFFFFF, so if we add one, it overflows and is 0.
We need to cast it to 64 bits before
2014-09-10 13:21:31 +02:00
Olivier Goffart
fa962b7f53 csync_update: fix compilation warning 2014-09-10 11:08:00 +02:00
Markus Goetz
1909b465dc CSync: Show file size and inode during update traversal
With the previous code, we saw those values only when the file/dir was also in the local DB
2014-09-05 15:23:33 +02:00
Olivier Goffart
a73fbccf8c t4.pl: add a test to test that ignored file are not deleted 2014-08-28 19:33:52 +02:00
Klaas Freitag
f1fb36bcb8 Tests: Get rid of the Carp package that ogoffart does not have.
Recommendation: Use a decent distribution! But anyway....
2014-08-28 18:10:53 +02:00
Olivier Goffart
d4bbd28757 csync: remove ignored_cleanup: it's not used anymore 2014-08-28 17:16:51 +02:00
Olivier Goffart
98b7248df0 reconcile/update: don't remove directory that contains ignored files 2014-08-28 17:16:17 +02:00
Olivier Goffart
79d13d9242 Selective sync: deselecting a folder removes it from the local file system 2014-08-28 15:53:49 +02:00
Markus Goetz
449abace66 CSync: Ignore OS X files with hidden flag 2014-08-21 16:43:24 +02:00
Klaas Freitag
e06e5fe55f Excludes: Fix unit tests for the new exclude load interface.
Also removed some commented lines.
2014-08-21 13:12:05 +02:00
Klaas Freitag
dc8f437b31 Excludes: Add an context free implementation of exclude file loading.
So that we are more thread safe.
2014-08-21 12:43:04 +02:00
Olivier Goffart
936252765a Merge branch 'master' into selective_sync
Conflicts:
	src/mirall/syncengine.cpp
	src/mirall/syncengine.h
2014-08-18 14:44:43 +02:00
Klaas Freitag
ddbe181e48 Update phase progress: Check if callback is defined. 2014-08-18 11:51:45 +02:00
Markus Goetz
64a7025522 CSync: Add a 30 second connect (not read) timeout 2014-08-15 15:54:13 +02:00
Markus Goetz
ce2741cebc SyncEngine & UI: Progress notifications for update phase
For each directory (local and remote, we have UI update throtting code)
a signal is emitted.
It is used by the settings dialog and the tray menu.
2014-08-15 15:28:35 +02:00
Olivier Goffart
c1831f4946 Selective sync: use a black list instead of a white list 2014-08-15 12:29:10 +02:00
Olivier Goffart
4b2c1bacd1 Merge remote-tracking branch 'origin/master' into selective_sync 2014-08-15 10:28:50 +02:00
Klaas Freitag
b09498d852 csync journal: Improve get_below_path query.
Add another index on the pathlen column. Use that column to deselect
all rows that are shorter than the path to search files below. That
shrinks the amount of rows to examine using LIKE tremendously by
a cheaply to query for criteria.
2014-08-14 13:52:44 +02:00
Klaas Freitag
8bc0d9acd3 Updater: Added a bit of useful logging. 2014-08-14 11:07:31 +02:00
Klaas Freitag
73325bcd41 csync statedb: Fixed handling of sqlite reply value. 2014-08-14 11:07:31 +02:00
Klaas Freitag
1b5bbfdad3 csync statedb: Set sqlite3_busy_timeout to 5 seconds. 2014-08-14 11:07:31 +02:00
Markus Goetz
4c0891a22e Tests: Give a more random name to test directories
Conflicts:
	csync/tests/ownCloud/ownCloud/Test.pm
2014-08-12 16:27:03 +02:00
Olivier Goffart
4ff0e7e0a2 Silent some warnings 2014-08-12 14:03:04 +02:00
Olivier Goffart
12459bf07e selective sync: fix whitelist matching 2014-08-12 11:43:42 +02:00
Olivier Goffart
7e009667a2 Selective sync: ignore the files that are not in the selective sync white list 2014-08-11 18:42:24 +02:00
Klaas Freitag
12f5e4b46e csync oC Util: set field flag correctly to avoid etag memleak.
The fields varialbe should contain or'ed flags of the fields set
in the csync_vio_file_stat_t struct. The problem was that the field
for CSYNC_VIO_FILE_STAT_FIELDS_PERM was assigned rather than or'ed
which makes the release function for the struct not freeing the
etag memory => memleak.
2014-08-07 23:14:21 +02:00
Klaas Freitag
c3f8e099f4 tests: Never stumble over an already existing test share dir. 2014-08-07 15:45:17 +02:00
Klaas Freitag
e71ce01f90 tests: Some more tests with local files and shares. 2014-08-07 12:48:14 +02:00
Olivier Goffart
6827f9977c Merge branch 'il'
Conflicts:
	doc/ocdoc
2014-08-07 12:15:50 +02:00
Olivier Goffart
6d24bd0361 journaldb: Fix that fileid might be missing in the db
When recovering from a inalid move operation, we call
avoidReadFromDbOnNextSync. This will remove the fileid from the db so
we don't detect a move on the next sync.  But we want the next sync to fetch
the file id again, and this can only happen if we don't read them
from the db and do the actual PROPFIND, this is done by avoidReadFromDbOnNextSync

However, if there is propagation in that source directory later, it
will overide the invalid etag with the real one and we will not uissue the PROPFIND
to fetch the fileid.
We must therefore also protect the future write to the DB when calling
avoidReadFromDbOnNextSync
2014-08-07 12:14:45 +02:00
Markus Goetz
22c1629dd3 SyncEngine: Keep csync_journal with proper values for fileId and remotePerm
Before this patch, we had a lot of empty rows because we created
the SyncFileItems with the wrong(=local) data.
2014-08-07 10:14:14 +02:00
Klaas Freitag
fe2e4d87c5 tests: Fix t5: work with ownCloud 7 sharing. 2014-08-06 17:19:02 +02:00
Klaas Freitag
e9c4635f6b tests: Add another two seconds break, hope to make it work in virt. env.
Tests fail randomly on the CI computer which is virtualized. Maybe this
fix helps.
2014-08-06 11:34:35 +02:00
Olivier Goffart
f1ad82d0ba t2.pl Fix the test testing that moving a file that was just added do not create duplicate 2014-07-29 13:58:21 +02:00
Klaas Freitag
8d85516e72 tx.pl: Add a chunking update test, test for precondition failed. 2014-07-22 18:07:34 +02:00
Klaas Freitag
4dfe0fad7d tests: Big file chunking, change an existing big file to trigger update
This failed on oC7
2014-07-22 10:45:03 +02:00
Klaas Freitag
77e3480b2f csync oC Util: set field flag correctly to avoid etag memleak.
The fields varialbe should contain or'ed flags of the fields set
in the csync_vio_file_stat_t struct. The problem was that the field
for CSYNC_VIO_FILE_STAT_FIELDS_PERM was assigned rather than or'ed
which makes the release function for the struct not freeing the
etag memory => memleak.
2014-07-21 13:19:36 +02:00
Olivier Goffart
8a88ca6f34 Merge branch 'il'
Conflicts:
	src/mirall/propagator_legacy.h
2014-07-18 17:00:38 +02:00
Olivier Goffart
336e74b992 csync_owncloud: fix the name of the permissions property 2014-07-18 16:52:04 +02:00
Klaas Freitag
74b3e2ce3f tests: Another try to get around the jenkins test problem. 2014-07-18 12:20:14 +02:00
Klaas Freitag
2981b37219 Use file size of factor of four because of the createLocalFile algorithm 2014-07-17 10:29:13 +02:00
Klaas Freitag
2a5691e575 tests: Fix assertion. 2014-07-16 17:26:06 +02:00
Klaas Freitag
774432066e tests: Reverted previous change, do not append in createLocalFile() 2014-07-16 17:25:18 +02:00
Klaas Freitag
d5a8661480 tests: do not use system any more to modify files, rather perl native. 2014-07-16 14:06:57 +02:00
Klaas Freitag
9dacad99fa t1.pl: Change the corruption creation command. 2014-07-10 12:07:28 +02:00
Olivier Goffart
cbc7942a00 Added t8.pl that test case sensitivity issues
Made some change in the .cpp code in order to be able to test
the code when the file system is case sensitive
2014-07-09 22:44:08 +02:00
Olivier Goffart
9c3c4bac66 Merge remote-tracking branch 'origin/il' 2014-07-01 20:37:42 +02:00