1
0
mirror of https://github.com/chylex/Nextcloud-Desktop.git synced 2024-10-25 03:42:48 +02:00
Commit Graph

406 Commits

Author SHA1 Message Date
Roeland Jago Douma
9d829b2933 Move the proxyfiles to libsync where they make more sense
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Signed-off-by: Michael Schuster <michael@schuster.ms>
(cherry picked from commit 50dcab5f88)
Signed-off-by: Michael Schuster <michael@schuster.ms>
2020-06-18 21:36:40 +02:00
Michael Schuster
ad524e8a61
Simplify nullptr comparisons where appropriate
Make the codebase consistent, we already have a lot of implicit pointer comparisons.

Exception: Stay explicit on return's, example:
  return _db != nullptr;

Signed-off-by: Michael Schuster <michael@schuster.ms>
(cherry picked from commit 456c1eadbe)
Signed-off-by: Michael Schuster <michael@schuster.ms>
2020-06-11 02:19:57 +02:00
Stephan Beyer
e6236d4ef5 Replace NULL by nullptr in all C++ files
We keep NULL in the pure C files in src/csync/std and test/csync.

We also replace Doxygen documentation referring to "NULL" to
"\c nullptr" (formatted as code).

Signed-off-by: Stephan Beyer <s-beyer@gmx.net>
(cherry picked from commit 39198e4116380d577241658920d6ae213c0f5d38)
Signed-off-by: Michael Schuster <michael@schuster.ms>
2020-06-10 04:09:44 +02:00
Kevin Ottens
fb6f998a7a testLaunchOnStartup shouldn't fail on dev setup
This test was failing locally for me. Indeed, through QStandardPaths it
was finding the user settings of my production client and not having the
initial state it expected. Using QStandardPaths test mode then it starts
from a clean slate every time.

Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-05-27 14:13:25 +00:00
Kevin Ottens
fb428847af Use the return braced init list pattern
This way we avoid repeating the return type while it is already known.

Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-05-27 14:09:38 +00:00
Kevin Ottens
f48ebfd0ab Use using instead of typedef
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-05-27 03:05:47 +00:00
Kevin Ottens
0fb0fc2d7e
Don't use int literals for bools
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
(cherry picked from commit 5543e4d834)
Signed-off-by: Michael Schuster <michael@schuster.ms>
2020-05-22 16:05:23 +02:00
Stephan Beyer
40121dd03d
Fix leak in OCC::AccountManager stub for FolderManTest
We simply use a static QObject using Q_GLOBAL_STATIC()
instead of allocating a leaking QObject on the heap.

Signed-off-by: Stephan Beyer <s-beyer@gmx.net>
(cherry picked from commit f275640343)
Signed-off-by: Michael Schuster <michael@schuster.ms>
2020-05-22 15:54:57 +02:00
Kevin Ottens
01d47ea60a Remove useless virtual, better use override only
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-05-20 01:28:27 +00:00
Kevin Ottens
3920f264c4 Properly handle denormalized href
In case of denormalized paths in the dav href (presence of . or .. in
the path) simple string startsWith comparison wasn't enough to know if
said href ended up in the right namespace. That's why we're now using
QUrl (pretending local file since we don't have a full URL in the href)
to normalize the path before comparison.

This could happen with broken proxies for instance where we would
wrongly validate the dav information resulting in potentially surprising
syncing and name collisions.

Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-05-19 23:32:25 +00:00
Michael Schuster
a6ff038f7f Updater: Fix Tests build (failed with BUILD_UPDATER=NO)
Also don't build the test for the updater, fix missing updater library.

Signed-off-by: Michael Schuster <michael@schuster.ms>
2020-03-10 22:42:49 +00:00
Michael Schuster
cc4e6b236a Fix Tests linkage (missed UserInfo.cpp in CMakeLists.txt)
Signed-off-by: Michael Schuster <michael@schuster.ms>
2020-02-17 00:31:37 +00:00
XNG
e3cb3b28ff
apply http2 qt resend patch from owncloud
Signed-off-by: XNG <Milokita@users.noreply.github.com>
(cherry picked from commit 768cf7e1ae)
Signed-off-by: Michael Schuster <michael@schuster.ms>
2020-02-14 17:45:33 +01:00
XNG
36049afbc4
apply http2 qt resend patch from owncloud
Signed-off-by: XNG <Milokita@users.noreply.github.com>
(cherry picked from commit d87a88e39f)
Signed-off-by: Michael Schuster <michael@schuster.ms>
2020-02-14 17:45:33 +01:00
XNG
59c165aa1d
apply http2 qt resend patch from owncloud
Signed-off-by: XNG <Milokita@users.noreply.github.com>
(cherry picked from commit 314c00a8b7)
Signed-off-by: Michael Schuster <michael@schuster.ms>
2020-02-14 17:45:30 +01:00
Dominique Fuchs
ed7c489722
Fixed typo preventing successful path rename on Win and modified ASSERT for Window path styles
Signed-off-by: Dominique Fuchs <32204802+DominiqueFuchs@users.noreply.github.com>
(cherry picked from commit f993e7c555)
Signed-off-by: Michael Schuster <michael@schuster.ms>
2019-12-05 20:04:25 +01:00
Camila San
728154386c
Once client gets 401/403 from the server, check if remote wipe was requested.
- When the the users logs because of 401 or 403 errors, it checks if the
server requested the remote wipe. If yes, locally deletes account and folders
connected to the account and notify the server. If no, proceeds to ask the
user to login again.
- The app password is restored in the keychain.
- WIP: The change also includes a test class for RemoteWipe.

Signed-off-by: Camila San <hello@camila.codes>
2019-11-04 19:31:17 +01:00
tuxmaster5000
bc31182c63
Rename owncloud tests to nextcloud 2019-11-04 19:31:07 +01:00
asapelkin
374375ce3f
little loops optimization
Signed-off-by: asapelkin <asapelkin0x01@ya.ru>
2019-10-17 20:55:56 +02:00
Sebastian Grund
a85c228e59
issue1216: added sync-exclude entry for emacs recovery files
Signed-off-by: Sebastian Grund <grund92@gmx.de>
(cherry picked from commit a9bea53c89)
Signed-off-by: Michael Schuster <michael@schuster.ms>
2019-10-17 20:37:11 +02:00
Samir Benmendil
5e3c2d2a96 Fix fullPath matching
Signed-off-by: Samir Benmendil <me@rmz.io>
2019-08-15 03:00:26 +01:00
Samir Benmendil
14279104ae Read .sync_exclude.lst in each subdirectory
Signed-off-by: Samir Benmendil <me@rmz.io>
2019-08-15 03:00:26 +01:00
Joshua Sterner
bd9fcd88d8 testMove3LevelDirWithFile now uses mv function to move the directory
Signed-off-by: Joshua Sterner <joshua.s.sterner@gmail.com>
2019-05-09 04:12:33 -07:00
Joshua Sterner
b6ff17c50b Fixed Issue #1000 - Subfolders of moved folders not synced
Signed-off-by: Joshua Sterner <joshua.s.sterner@gmail.com>
2019-05-09 04:12:33 -07:00
Camila San
b5b2ef3120
Updates test to fit new configuration default value.
Signed-off-by: Camila San <hello@camila.codes>
2019-04-12 16:22:07 +02:00
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