1
0
Fork 0
Commit Graph

381 Commits

Author SHA1 Message Date
Roeland Jago Douma 3b5d8f0277
Merge branch 'master' into upstream/pr/6656 2018-11-01 08:07:55 +01:00
Roeland Jago Douma dd39887f2b
Merge pull request #641 from nextcloud/upstream/pr/6621
TestOAuth: Don't have global static QObject
2018-10-30 22:38:51 +01:00
Roeland Jago Douma d246c1e8b9
Merge branch 'master' into upstream/pr/6485 2018-10-24 08:27:11 +02:00
Roeland Jago Douma 24606c0105
Merge branch 'master' into upstream/pr/6632 2018-10-23 22:51:12 +02:00
Roeland Jago Douma 6b7328bb87
Merge branch 'master' into upstream/pr/6632 2018-10-23 22:48:34 +02:00
Roeland Jago Douma f3529e3dd7
Merge branch 'master' into upstream/pr/6674 2018-10-23 21:43:13 +02:00
Olivier Goffart 08e4ba3363
Data-Fingerprint: Fix backup detection when fingerprint is empty
Add a test to test the data fingerprint feature make me realize it was broken.
The code was relying in the distinction between empty and null QByteArray,
but this was a bad idea as this difference is lost when going through QString.
2018-09-10 20:44:03 +02:00
Olivier Goffart b3e4ec9454
FolderMan::checkPathValidityForNewFolder: make sure to work when folder points to deleted folders
Note that we also needed to adjust the server url to contains the user name
in the folder wizard. (As checkPathValidityForNewFolder expect the user name)

Issue #6654
2018-09-09 22:02:44 +02:00
Olivier Goffart d202942a2c
Reconcile: When detecting a local move, keep the local mtime
https://github.com/owncloud/client/issues/6629#issuecomment-402450691
2018-09-09 21:38:10 +02:00
Olivier Goffart 7019f03e46
TestOAuth: Don't have global static QObject
Fix a strange warning seen on the log from the CI on Windows in
https://github.com/owncloud/client/pull/6621

The test shows, at the beginning
QObject::connect: No such signal DesktopServiceHook::destroyed(QObject*)
And crashes at the and.

My guess is that when QDesktopServices::setUrlHandler is called, the
QMetaObject is not yet initialized

But this is probably not the reason of the crash
2018-09-09 18:16:59 +02:00
Christian Kamm cba0627a9c
Ensure GETFileJob notices finishing #6581
It could happen that readyRead was emitted for incoming data while the
download was not yet finished. Then the network job could finish with
no more data arriving - so readyRead wasn't emitted again.

To fix this, the finished signal also gets connected to the readyRead
slot.
2018-09-09 11:50:00 +02:00
Christian Kamm 2844c925eb
Show a tray message when a folder watcher becomes unreliable #6119 2018-08-28 17:04:25 +02:00
Olivier Goffart d114212333
OwnSql: Fixup after feedback for #6388 2018-07-03 10:33:26 +02:00
Roeland Jago Douma 38b89a3fa0
Update testutility
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2018-06-28 13:37:02 +02:00
Roeland Jago Douma 6ab7e814a5
Fix tests to actually compile
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2018-06-28 13:37:02 +02:00
Christian Kamm 16ba0cf47e
Blacklist: Add unittest #6411 2018-06-11 14:50:01 +02:00
Christian Kamm 77fcff5bdf
Conflicts: Change tags to be more user friendly #6365
From "_conflict-user-yyyymmdd-hhmmss"
to   " (conflicted copy user yyyy-mm-dd hhmmss)"
2018-06-11 14:40:40 +02:00
Christian Kamm 3556482bce
TestChunkingNG: Remove unneeded test code 2018-06-07 08:53:12 +02:00
Olivier Goffart 012c638d4e
Uploads: Don't delete unexisting chunks
Since commit 4dc49ff3, we store an entry in the upload info table even
for non chunked uploads. However, if this fails we don't want to remove
non-existant stale chunks if the upload fails.

Without this commit, we would send a DELETE command to clean non-existant
chunks in the dav/uploads/ namespace.
2018-06-06 09:52:02 +02:00
Roeland Jago Douma c1171d700e
Merge pull request #322 from nextcloud/upstream/pr/6404
Excludes: Expand doc, Desktop.ini only in root folder
2018-06-04 17:13:23 +02:00
Olivier Goffart 0443f8dd4d
csync: Simplify csync_walk_local_tree/csync_walk_remote_tree
Small refactoring
2018-06-04 15:41:38 +02:00
Roeland Jago Douma 1262cbf4ef
Merge pull request #314 from nextcloud/upstream/pr/6373
Make sure ignored and conflict files show up in the issues tab even with partial local discovery
2018-06-02 20:20:19 +02:00
Olivier Goffart 311307e8cb
Move ClientProxy and ConnecitonValidator to gui
They are using the ConfigFile and are used to control
when to sync rather than for the sync itself
2018-05-31 21:56:55 +02:00
Roeland Jago Douma c6c42c3c70
Merge pull request #311 from nextcloud/upstream/pr/6371
Utility::fsCasePreserving: remove UNIT_TESTING ifdef
2018-05-29 20:33:34 +02:00
Roeland Jago Douma bb1b86b087
Merge pull request #307 from nextcloud/upstream/pr/6366
test/testsyncengine: testNoLocalEncoding is for Linux
2018-05-26 21:30:21 +02:00
Roeland Jago Douma b7d5aff901
Merge pull request #303 from nextcloud/upstream/issue/6322
SyncJournal: Don't use LIKE with paths
2018-05-18 13:56:25 +02:00
Christian Kamm 5f7fd7c551
Excludes: Expand doc, Desktop.ini only in root folder
The Desktop.ini exclude was added for 2.4 because we add such a file to
the synced folder on Windows. It doesn't need to cover subdirectories.
2018-05-16 20:29:12 +02:00
Christian Kamm 75194d1821
SyncEngine: Make "local discovery?" question available
Also fix the minor bug that was mentioned and add tests.
2018-05-16 16:46:40 +02:00
Olivier Goffart d4aebd30de
Utility::fsCasePreserving: remove UNIT_TESTING ifdef
Since the release package will be build with unit test, we don't
want to query the env variable at every call to fsCasePreserving.
So only test the env variable at startup.
And the testutility can still change the value.

(The env variable is still used from t8.pl and maybe smashbox)

Issue #6318
2018-05-16 12:57:20 +02:00
Markus Goetz f6b67a866a
test/testsyncengine: testNoLocalEncoding is for Linux 2018-05-15 23:06:39 +02:00
Christian Kamm ea142b8018
Conflicts with user name: Fix tests 2018-05-15 22:54:48 +02:00
Christian Kamm 17d174e6fa
Conflicts: Add user name to conflict file name #6325
For the case of uploading conflict files only.
2018-05-15 22:38:35 +02:00
Christian Kamm ce0e2d0b88
SyncJournal: Don't use LIKE with paths
Paths can contain the wildcards % and _ and that would lead to odd
behavior.

This patch also clarifies the behavior of avoidReadFromDbOnNextSync()
which previously dependend on whether "foo/bar" or "foo/bar/" was
passed as input.

Possibly affects #6322
2018-05-15 19:44:00 +02:00
Christian Kamm e2b89c5afe TextXmlParse: Add truncated-xml testcase #6317 2018-01-22 14:05:08 +01:00
Christian Kamm b9c7aa8df3 Sync: Deal with file/folder conflicts #6312
Previously conflicts with a different type on both ends lead to sync
errors. Now they are handled in the expected way: the local item gets
renamed and the remote item gets propagated downwards.

This also adds a unittest for the TYPE_CHANGE case. That one looks like
parts of it might be unified with CONFLICT cases.
2018-01-19 09:47:49 +01:00
Christian Kamm 4337e8532e Exclude matching: Speedup the full-path traversal case
Previously we'd use the full regex when the bname triggered a full-path
matching to take place. Now we have a simplified full-traversal regex
for this case that can be significantly faster to apply.

Triggered by #5017 but doesn't actually solve it.
2018-01-17 15:05:50 +01:00
Olivier Goffart 437d45981e Remove unused c_strlist 2018-01-13 13:58:17 +01:00
Olivier Goffart 3ae327ea8e Modernize out CMakeLists.txt
Mainly uses target_include_directories instead of include_directories
so libraries public include directory get automatically added when adding
the target in target_link_library
2018-01-13 13:58:17 +01:00
Olivier Goffart 5d0aa5f039 Remove unused c_path 2018-01-13 13:58:17 +01:00
Olivier Goffart 3ddd4b6f16 Get rid of csync_log
We use Qt's debugging code everywhere
2018-01-13 13:58:17 +01:00
Olivier Goffart d948ed11a1 Csync: use QElapsedTimer and qCInfo instead of CSYNC_LOG and its own csync time function
This allow to remove all the csync time manipulation routne which are now unused
2018-01-13 13:58:17 +01:00
Olivier Goffart 257d8142b1 Build system: Get rid of QtVersionAbstraction.cmake
Use modern cmake with target_link_libraries and Qt5:: that
automatically add the include path and compile flags
2018-01-13 13:58:17 +01:00
Olivier Goffart 776bbbf7b1 Don't include sqlite3.h from headers
So that sqlite is not part of the public interface of csync
(and that the sqlite include path don't need to be passed when compiling
libsync or gui)
2018-01-13 13:58:17 +01:00
Olivier Goffart 9613f6437d Merge remote-tracking branch 'origin/2.4'
Conflicts:
	src/libsync/networkjobs.cpp
2018-01-11 10:46:50 +01:00
Christian Kamm 7d70f1becb Ignore files that can't be encoded for the filesystem
There's an upstream bug where QTextCodec::canEncode returns true even
though it should be false. This works around that issue and adds a test.

The original work was done in 72809ef5b1

See #6287, #5676, #5719
See https://bugreports.qt.io/browse/QTBUG-6925
2018-01-10 13:36:00 +01:00
Christian Kamm 585d2b20bd Exclude regex: Restore old matching on Windows #6245
Unfortunately matching behaved differently on Windows. This patch
restores the previous matching behavior but still uses the new regular
expression based matching.

Further work will hopefully unify the behavior between platforms without
breaking backwards compatibility.
2018-01-09 11:09:05 +01:00
Olivier Goffart 1940c2f9bf Exclude: Use Qt to load the exclude file
fopen does not work well with relative path tand forward slashes on windows
This fix the windows textexcludedfiles test.
And also make the code simpler.

Note that the 'trimmed' might be a behavior change, but i think it is ok
2017-12-15 19:16:20 +01:00
Christian Kamm a7c0cfc8eb Upload conflict files #4557
If the server has the 'uploadConflictFiles' capability conflict
files will be uploaded instead of ignored.

Uploaded conflict files have the following headers set during upload
  OC-Conflict: 1
  OC-ConflictBaseFileId: 172489174instanceid
  OC-ConflictBaseMtime: 1235789213
  OC-ConflictBaseEtag: myetag
when the data is available. Downloads accept the same headers in return
when downloading a conflict file.

In the absence of server support clients will identify conflict files
through the file name pattern and attempt to deduce the base fileid.
Base etag and mtime can't be deduced though.

The upload job for a new conflict file will be triggered directly from
the job that created the conflict file now. No second sync run is
necessary anymore.

This commit does not yet introduce a 'username' like identifier that
automatically gets added to conflict file filenames (to name the files
foo_conflict-Fred-1345.txt instead of just foo_conflict-1345.txt).
2017-12-15 18:03:53 +01:00
Christian Kamm 8eebc53728 Unify item type enum
Previously, there was csync_ftw_type_e and SyncFileItem::Type. Having
two enums lead to a bug where Type::Unknown == Type::File that went
unnoticed for a good while.

This patch keeps only a single enum.
2017-12-15 18:02:04 +01:00
Olivier Goffart ee366df58f Fix the TestFolderMan on Windows 2017-12-15 14:51:00 +01:00