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
Olivier Goffart
2f284209d8
Permissions: When moving is not allowed, fallback to delete and upload
...
We decided that we never want to rename a directory behind the
back of the user as the user may be using files in the directory
during the sync.
If moving is not allowed, we just erase the inode form the database so
the next sync will try to do an upload and delete and recover from there
using normal resolution.
This also add some code to update the inode back to the db when it is detected
as changed.
2014-06-27 15:30:08 +02:00
Olivier Goffart
9066ad5790
t7.pl: Test that deleting a directory restores it and all its sub directories
2014-06-27 11:31:35 +02:00
Olivier Goffart
62d0e670dc
Add t7.pl Test for operation of files with restrictions
2014-06-27 11:22:53 +02:00
Olivier Goffart
21d7d8988a
t1.pl: add a sleep to make sure the mtime of the files are different
...
It could be that the files are changed in the same second if the previous
sync was fast, and therefore the changes not detected.
2014-06-26 13:11:47 +02:00
Olivier Goffart
fbadadc377
propagator: Fix folder duplication if the folder is renamed on the server while uploading
...
While uploading a new folder, if the folder is renamed on the server
when still uploading, the result will be that the files that are already
uploaded will end up in the new filder name, but the file that were
not still are in the old folder.
After renaming, all the new uploads wil fail with an error on this sync
because the parent directory don't exist.
But they were uploaded with the old name in the next sync because
the renaming was not detected because the file id was not in the DB
Fix the problem by fetching the file id always when creating a new
directory, on the next sync, and saving it in the database ummediatly
https://github.com/owncloud/enterprise/issues/191
2014-06-24 12:00:13 +02:00
Olivier Goffart
8de3bda0b1
csync_update: update the permission in the db when they change
...
The current code only update the permissions in the DB when
the permission becomes non-empty.
Now we update the permission each time they change.
That way the code is the same for file id and permission so it is
simpler.
2014-06-24 11:10:50 +02:00
Olivier Goffart
9c0a21a5fb
Permission: keep a space if the permission is empty
...
To distinguish no permission present to nothing is allowed.
That was the intention of the old code but it did not work as
the first if was always taken
2014-06-24 10:52:42 +02:00
Olivier Goffart
02704cdf74
Merge remote-tracking branch 'origin/1.6' into il
...
Conflicts:
VERSION.cmake
csync/src/csync_statedb.c
src/mirall/syncengine.cpp
src/mirall/syncfileitem.h
2014-06-23 12:48:34 +02:00
Klaas Freitag
041066a252
Exclude: Add a missing free in case of empty lines.
...
This fixes Coverity CLT 12893
2014-06-20 15:15:35 +02:00
Olivier Goffart
b29a757b18
Revert "csync file util: Remove compare file function, not needed anymore."
...
This break the test.
And the function is aleady gone in master anyway
This reverts commit 407b3bebfe
.
2014-06-20 14:29:43 +02:00
Klaas Freitag
db3d2eed5f
csync core: Remove logically dead code: Can never be reached.
...
This fixes Coverity CID 12881
2014-06-20 13:08:03 +02:00
Olivier Goffart
b34afa1afc
reconcile: use the proper enum type
...
thankfully the value hapenned to be the same, but the type
is of CSYNC_FTW_.. and not CSYNC_VIO_FILE_TYPE
Detected by coverity (CID 12887)
2014-06-20 11:51:07 +02:00
Olivier Goffart
b7c9fa6d5f
csync_owncloud: silent CID 12883
2014-06-20 11:51:07 +02:00
Klaas Freitag
407b3bebfe
csync file util: Remove compare file function, not needed anymore.
...
This also fixes Coverity CID 12890 and CID 12898
2014-06-20 11:39:28 +02:00
Olivier Goffart
f04c80dd0e
httpbf: silent coverity issue 12905
2014-06-20 11:33:29 +02:00
Klaas Freitag
b144a5bbf9
csync_exclude: Add a missing free of path components.
...
This fixes Coverity CID 12895
2014-06-20 11:14:50 +02:00
Olivier Goffart
5225fe07e0
csync_owncloud_recursive_propfind: "fix" possible memory leak
...
This was only leaking memory if ne_path_parent returns 0, which
should never happen
This fixes coverity issue 12897
2014-06-20 11:12:45 +02:00
Klaas Freitag
85cdbd1f1d
stateDB: Close the file descriptor even if stat failed.
...
This fixes Coverity CID 12897
2014-06-20 11:05:40 +02:00
Klaas Freitag
e4f8a136f1
StateDB: Free locale string also if attribs are invalid.
...
This fixes Coverity CID 12898
2014-06-20 11:05:40 +02:00
Daniel Molkentin
c263c38cdf
statedb.c: fix potential memory leak on win32
...
This fixes coverity issue 12898
2014-06-20 10:58:03 +02:00
Daniel Molkentin
df8553e878
httpbf.c: Fix resource leak
...
This fixes Coverity CID 12902
2014-06-20 10:58:03 +02:00
Daniel Molkentin
bec66c85d4
Fix potential memory leak
...
This fixes Coverity CID 12893
2014-06-20 10:58:03 +02:00
Daniel Molkentin
f9710cc1d5
c_time: Fix resource leak in error case
...
This fixes Coverity CID 12903
2014-06-20 10:58:03 +02:00
Klaas Freitag
d0c992c991
Updater: Free tmp variable that might point to temp malloced memory
...
This fixes Coverity CID 12900
2014-06-20 10:41:01 +02:00
Klaas Freitag
9ee86cf06b
Fix resource leak in win32 code path, added free of locale filename.
...
This fixes Coverity CID 12901
2014-06-20 10:25:00 +02:00
Olivier Goffart
38254125c9
csync: fix the size in strncpy for the remote perms
...
We must only do strncpy with size one smaller than
the size of the buffer in order to leave at least
one '\0' at the end
2014-06-18 15:56:13 +02:00
Olivier Goffart
e5b3363ecf
csync_statedb: remove noisy output
2014-06-18 15:40:26 +02:00
Olivier Goffart
0a953b91f9
csync_vio_local: fix memory leak on windows
2014-06-17 16:40:38 +02:00
Olivier Goffart
ade92d8ac1
csync test: fix warning
2014-06-17 14:16:42 +02:00
Markus Goetz
a5967e4ecd
CSync: Fix win32 compile
2014-06-16 16:53:10 +02:00
Olivier Goffart
2f361278d2
Merge remote-tracking branch 'origin/1.6' into 'il'
2014-06-16 16:41:48 +02:00
Markus Goetz
319cf76417
CSync: Move compiler ifdef outwards
2014-06-16 16:26:00 +02:00
Markus Goetz
be7b08b50a
CMake: Fix token auth compile
2014-06-16 15:34:46 +02:00
Markus Goetz
61999a67cd
CSync: Give ctx to proxy callback
...
This fixes a crash.
2014-06-13 15:36:00 +02:00
Klaas Freitag
e1db834ec9
Add missing cmakedefine for HAVE_ASPRINTF and minor cleanup.
...
Fixes windows build.
2014-06-13 13:30:59 +02:00
Olivier Goffart
d5bd3190d4
csync unit tests: fix cimpilation
2014-06-07 12:08:58 +02:00
Markus Goetz
8dbfcd782b
CSync: Fetch permissions from server for whole tree on server update
2014-06-06 17:10:07 +02:00
Markus Goetz
70ff928381
CSync & statedb: Parse 'perm' from server
...
ownCloud 6 sends this.
2014-06-06 15:24:17 +02:00
Markus Goetz
b48ab79a92
CSync & statedb: Remove uid/gid
...
Columns are still in the DB as we don't want to break any compatibility.
2014-06-06 13:41:16 +02:00
Markus Goetz
9a7fbd4f71
csync_owncloud: Parse properties in one function
2014-06-06 13:41:16 +02:00
Olivier Goffart
6dd248e527
csync: fix warnings
...
warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
2014-06-05 15:48:53 +02:00
Olivier Goffart
7d00c3646a
csync: remove unused variable
2014-06-05 15:45:15 +02:00
Olivier Goffart
e355e12385
Fix crash in tests
2014-06-05 15:43:27 +02:00
Markus Goetz
34b31c0146
CSync: Fix test compile
...
The previously applied pull request apparantly broke the compile
because it re-ordered entries in the CMakeLists
2014-06-05 14:22:10 +02:00
Daniel Molkentin
7fcf6f9f79
Merge branch '1.6'
2014-06-05 12:01:50 +02:00
Olivier Goffart
bd48ab23c3
Merge pull request #1835 from zizzfizzix/cmake_fixes
...
A little CMake cleanup
2014-06-05 11:48:40 +02:00
Markus Goetz
4e28ba73bb
Windows: Fix build harder.
2014-06-05 10:13:20 +02:00
Markus Goetz
d4d630b2e9
Windows: Fix build
2014-06-04 12:47:17 +02:00
Markus Goetz
2f81167164
CSync: Remove more unused things
2014-06-04 11:19:09 +02:00
Markus Goetz
6897c5d41f
CSync: Always have statedb enabled
2014-06-04 11:06:41 +02:00
Markus Goetz
233450d850
CSync: Remove config dir setting
2014-06-04 10:56:56 +02:00
Markus Goetz
7428a8fa63
CSync: Remove unused std functions
2014-06-04 10:33:19 +02:00
Markus Goetz
18359d7871
StateDB: Remove _csync_win32_hide_file and use other implementation
2014-06-04 09:46:31 +02:00
Kuba Serafinowski
62ea6f316f
don't look for CMocka if we're not building unit tests
2014-06-04 00:10:16 +03:00
Olivier Goffart
6605a89990
csync_statedb: Fix wrong % code in debug output
...
%ld is for long, but int64_t is larger than long on windows
2014-06-03 18:28:31 +02:00
Olivier Goffart
4cb9b3a85b
Test: fix compilation
2014-06-03 17:54:43 +02:00
Olivier Goffart
806ab8ea46
csync: remove the local mode
...
It is no longer used for a long time
2014-06-03 17:52:07 +02:00
Olivier Goffart
582a8fe7fd
Merge branch '1.6'
2014-06-03 17:27:12 +02:00
Olivier Goffart
08ca8b54b1
test fles with '%' and '#'
2014-06-03 17:27:06 +02:00
Markus Goetz
e49b8981dd
CSync: Shorten WebDAV property name
2014-06-03 16:41:57 +02:00
Markus Goetz
2e91557c28
CSync: Rename callback functions
2014-06-03 15:01:35 +02:00
Markus Goetz
4d4eab8b1c
CSync & Propagator: Support a direct download URL
...
This is for server file backends that support sending a
direct URL.
2014-06-03 14:55:34 +02:00
Olivier Goffart
13f9970257
Fix some possible "Precondition Failed" bug
...
The problem was if there was a false conflict: the file has been touched
both on the server and the client.
- etag has changed on the server
- mtime has changed on the server and the client and is the same
- and file size is the same on both the server and the client
This may also happen if the file is uploaded on the server, but the client
looses connection (or crashes) before it get notified of the etag.
In both tree, the instruction is EVAL, but we reduce it to a NONE because
we detected that the conflict is 'false'. Still, we need to update the db
with the new etag. (_should_update_db)
The problem was that we would set the flag on the wrong tree.
This was not a problem when the file was NEW on both side since we checked
for null etag and used the other one then.
2014-06-03 12:23:30 +02:00
Markus Goetz
4d4ae9374b
CSync: Remove old defines
2014-06-03 11:51:12 +02:00
Markus Goetz
b8e20b412c
CSync: We can access the context directly
2014-06-03 11:51:12 +02:00
Markus Goetz
e36f3c5b10
CSync: Remove one VIO layering
2014-06-03 11:51:12 +02:00
Markus Goetz
8a55f831f4
CSync: Use context instead of global variable
2014-06-03 11:51:12 +02:00
Markus Goetz
0dcc9be5c1
CSync: Remove owncloud_stat
...
We get already all metadata with the readdir
2014-06-03 11:51:12 +02:00
Markus Goetz
5ee00a8df7
CSync: Simplify csync_owncloud stat/resource handling
2014-06-03 11:51:12 +02:00
Klaas Freitag
16d35c1489
Avoid crash on csync_ctx is NULL.
2014-06-03 09:50:09 +02:00
Olivier Goffart
3228fde4af
Only set should_update_etag for directories in the update case
...
If there is an error during the local rename for a file, we don't
want to write the entry for the destination before because there might be
an error
2014-05-26 16:11:05 +02:00
Klaas Freitag
1303379c9e
Remove useless global varialbe for auth callback.
2014-05-22 12:54:14 +02:00
Markus Goetz
667c835c49
Revert "remove auth callback setting in the csync module."
...
This commit broke syncing.
We need the callback to supply the password.
This reverts commit 8738128504
.
2014-05-21 20:02:22 +02:00
Klaas Freitag
8738128504
remove auth callback setting in the csync module.
2014-05-21 11:09:02 +02:00
Klaas Freitag
069eaf9170
Clear the authentication callbacks set before.
2014-05-21 11:09:02 +02:00
Klaas Freitag
3705a42375
Remove misleading error message of "unknown error" for custom errnos.
2014-05-13 10:39:37 +02:00
Olivier Goffart
d7a226e0e6
Silent warning:
...
warning: no previous prototype for ‘set_csync_file_locked_or_open_ext’ [-Wmissing-prototypes]
2014-05-07 12:38:57 +02:00
Klaas Freitag
a50c39cd0c
Maintain the original inode value for renamed files.
...
In case two renames are done on the same file/folder very quickly we
lost the information that the second operation was also a rename. That
was because we tried to get the inode value from a stat on the file once
the first rename was finished. But at that point, the file was already
gone because of the second rename.
Now the original inode is kept and written to db in case the file can
not be stat'ed.
This fixes bug #1737
2014-05-06 12:55:54 +02:00
Markus Goetz
6c44f53645
Set network timeout to 300 sec
...
As per previously used values (see source and changelog)
2014-05-02 15:35:40 +02:00
Olivier Goffart
988c162d2f
Have only one place where we read the timeout
2014-05-02 13:04:53 +02:00
Olivier Goffart
3d8d4fecd7
delete dead code
2014-05-02 11:50:20 +02:00
Olivier Goffart
752112dbaa
Initialize the size properly on windows
2014-04-30 12:06:55 +02:00
Markus Goetz
3bf15541c6
Add set_csync_file_locked_or_open_ext
...
Without using function, there were problems with DLL import/export
2014-04-29 18:37:34 +02:00
Olivier Goffart
0bffdfb256
Fix compiler warnings, and be less spammy in the log
2014-04-29 12:30:13 +02:00
Olivier Goffart
9f0848ba15
Merge remote-tracking branch 'origin/libowncloudsync_noqtgui'
2014-04-29 12:23:15 +02:00
Markus Goetz
7f752c7e93
Csync: Plug code for csync_file_locked_or_open
2014-04-28 16:57:56 +02:00
Markus Goetz
b39359c929
Csync: Add hook for checking if a file is in use already
2014-04-28 14:18:58 +02:00
Klaas Freitag
b42d3ced15
Another fix for make install on MacOSX
2014-04-28 11:19:25 +02:00
Klaas Freitag
1c73a8d4ad
Fix installation for MacOSX
2014-04-28 10:24:12 +02:00
Olivier Goffart
165e35c750
t1.pl: change assertLocalAndRemoteDir so we actually test something
2014-04-25 14:35:20 +02:00
Olivier Goffart
9da261acd8
Do not read from the database when upgrading from 1.5
...
We need to make sure that the file id are updated (if the user
had upgraded from owncloud 5 to owncloud 6 while using owncloud 1.5)
2014-04-25 13:31:44 +02:00
Olivier Goffart
cc7826e087
Add a compile option to disable renaming when the extension changes
...
This is only used for a very specific server that do not support
changing the extension of files without re-uploading the file.
Since the change is small and self contained, it is guarded by a #ifdef
(Removed old BLACKLIST_ON_ERROR option that is no longer in use)
2014-04-24 11:51:48 +02:00
Klaas Freitag
888843e655
Removed another file for Jenkins.
2014-04-23 13:22:06 +02:00
Klaas Freitag
28970393f6
Removed a test file as jenkins fails on it.
2014-04-23 13:18:28 +02:00
Markus Goetz
94f380c1f0
Updater: Ignore files matching with CSYNC_CONFLICT_FILE_USERNAME
2014-04-22 17:05:59 +02:00
Klaas Freitag
521373f075
More specific log output.
2014-04-22 09:33:07 +02:00
Olivier Goffart
7d3b0fe0c5
Fix memory leak: Don't need to call strdup here
...
The other_node outlive the trav structure, so we can just use the same pointer
2014-04-18 19:16:10 +02:00
Olivier Goffart
fa38bf7029
Make sure the fileid are saved to the database when upgrading from owncloud5 to owncloud6
...
We fetch the id from the server, but don't save them in the database.
I Could have used INSTRUCTION_UPDATED for that, but then i would need to update the
reconcile algorithm to take in account the fact that UPDATED is possible there.
Instead, use should_update_etag which means the db is going to be written again
Remove reference to old instruction _UPDATED and _DELETED which does not make sens with
the new propagator
Improve the test to test this case, and that etags are properly writen to the DB
when there is a fake conflict
2014-04-18 18:27:27 +02:00
Olivier Goffart
bfdf638334
Add the files required by the tests.
...
Somehow they got removed with all the moving and merging.
Especially kernelcrash.txt is required for t1.pl
2014-04-18 17:20:42 +02:00
Klaas Freitag
30a14b9f45
Install ocsync library to private lib directory, use rpath to find it.
2014-04-11 13:28:11 +02:00
Daniel Molkentin
af3af94a01
Allow tests to run against SSL-self-signed servers
2014-04-08 12:39:46 +02:00
Klaas Freitag
8ed0fdcfa5
Fix info print in test script.
2014-04-07 16:36:35 +02:00
Klaas Freitag
ebf3c78237
More fine granular chunking test - improved t6.pl
2014-04-07 16:30:02 +02:00
Klaas Freitag
fc2923aa9b
Unlink the compare file after the remote cleanup.
2014-04-07 15:10:55 +02:00
Klaas Freitag
5aeee6d1f2
Use curl to get the file back, fix the LWP based download later.
2014-04-04 17:00:20 +02:00
Klaas Freitag
a759c93fb6
Add a new test script to check for big file chunking.
2014-04-04 16:33:57 +02:00
Olivier Goffart
20e850501d
Make sure we do not remove files that are replaced by a symlink
...
As we ignore symlink, we should not remove on the server the files that
are ignored.
Change tested in t4.pl
Relates to #1299
2014-04-03 17:47:49 +02:00
Klaas Freitag
062a0907db
Remove HTTP::DAV fragment and hardcode required version in Test.pm
2014-04-03 10:16:09 +02:00
Klaas Freitag
ead935e0a6
Add an open to open the dav connection.
2014-04-02 16:45:31 +02:00
Olivier Goffart
eaf5681f61
Put the sync log in the actual folder
2014-04-02 16:36:32 +02:00
Klaas Freitag
cba160706a
Minor cleanup
2014-04-01 16:14:24 +02:00
Klaas Freitag
fa453296c9
Enable SSL for testing.
2014-04-01 16:14:24 +02:00
Klaas Freitag
58aaad3fed
Add options to createRemoteDir
2014-04-01 16:14:24 +02:00
Klaas Freitag
8625ec250b
Add a trust ssl certificate switch
2014-04-01 16:14:24 +02:00
Klaas Freitag
ab439f8f0f
Proper cleanup of the shared directory.
2014-03-28 16:15:59 +01:00
Klaas Freitag
384a8d0d72
Added t5.pl which does basic testing with a Shared directory.
2014-03-28 15:04:14 +01:00
Daniel Molkentin
4e0b6179f9
Libocsync is a library, not a plugin
...
This is needed to deploy the library correct in OS X.
2014-03-28 14:46:08 +01:00
Olivier Goffart
8de9bec122
Remove progress info from csync
...
csync doesn't do no propagation no more
2014-03-28 10:50:15 +01:00
Olivier Goffart
5204a992b2
Remove HBF stuff from csync_owncloud
...
csync doesn't do no propagation no more
2014-03-28 10:41:48 +01:00
Markus Goetz
67f4d0c85b
CSync: Debug message if no exclude file defined
2014-03-27 17:11:19 +01:00
Klaas Freitag
5481215813
Remove unused variable.
2014-03-26 18:18:20 +01:00