1
0
mirror of https://github.com/chylex/Nextcloud-Desktop.git synced 2026-04-03 18:11:32 +02:00

Compare commits

..

185 Commits

Author SHA1 Message Date
Markus Goetz
57bc7918d7 2.3.3 release 2017-08-28 21:43:25 +02:00
Jenkins for ownCloud
8d72aedb48 [tx-robot] updated from transifex 2017-08-08 02:18:29 +02:00
Jenkins for ownCloud
d1abebf5b3 [tx-robot] updated from transifex 2017-08-07 02:18:30 +02:00
Jenkins for ownCloud
f92cb4dcb7 [tx-robot] updated from transifex 2017-08-06 02:18:37 +02:00
Markus Goetz
0437e716f0 ChangeLog: 2.3.3 2017-08-04 17:42:05 +02:00
Markus Goetz
e86416fff7 Notifications: Propagate "Dismiss" as DELETE to server #5922 2017-08-04 12:32:31 +02:00
Jenkins for ownCloud
3cd8a2be1c [tx-robot] updated from transifex 2017-08-04 08:32:05 +02:00
Jenkins for ownCloud
3b28e863c4 [tx-robot] updated from transifex 2017-08-03 02:18:29 +02:00
Jenkins for ownCloud
38478ead98 [tx-robot] updated from transifex 2017-08-02 02:18:30 +02:00
Jenkins for ownCloud
e4b40b0f49 [tx-robot] updated from transifex 2017-08-01 02:18:29 +02:00
Jenkins for ownCloud
f174576674 [tx-robot] updated from transifex 2017-07-31 02:18:28 +02:00
Jenkins for ownCloud
af052ea839 [tx-robot] updated from transifex 2017-07-30 02:18:27 +02:00
Jenkins for ownCloud
54e91a4ad5 [tx-robot] updated from transifex 2017-07-29 02:18:31 +02:00
Jenkins for ownCloud
3198ecf19b [tx-robot] updated from transifex 2017-07-28 02:18:29 +02:00
Jenkins for ownCloud
513848e93b [tx-robot] updated from transifex 2017-07-27 02:18:30 +02:00
Jenkins for ownCloud
3d0abdf5d0 [tx-robot] updated from transifex 2017-07-26 02:18:29 +02:00
Markus Goetz
a6dd3d0baf ChangeLog: 2.3.3 2017-07-25 19:46:57 +02:00
Jocelyn Turcotte
e9bc49b905 windows: Fix a memory leak in FileSystem::longWinPath
Also use c_path_to_UNC directly instead of doing an extra
UTF-8->wchar conversion.

(cherry picked from commit 5a1bf7d8fe)
2017-07-25 19:31:41 +02:00
Jenkins for ownCloud
80bc9d873e [tx-robot] updated from transifex 2017-07-25 02:18:28 +02:00
Jenkins for ownCloud
27ff952a88 [tx-robot] updated from transifex 2017-07-24 02:18:29 +02:00
Jenkins for ownCloud
c4e1ed5bcd [tx-robot] updated from transifex 2017-07-23 02:18:29 +02:00
Jenkins for ownCloud
628c24209e [tx-robot] updated from transifex 2017-07-22 02:18:31 +02:00
Jenkins for ownCloud
2601ecf936 [tx-robot] updated from transifex 2017-07-21 02:18:28 +02:00
Jenkins for ownCloud
c8c2b3cf66 [tx-robot] updated from transifex 2017-07-20 02:18:37 +02:00
Jenkins for ownCloud
5ad4e093bd [tx-robot] updated from transifex 2017-07-19 02:18:28 +02:00
Jenkins for ownCloud
53f35239c8 [tx-robot] updated from transifex 2017-07-18 02:18:35 +02:00
Jenkins for ownCloud
c38eaf5c33 [tx-robot] updated from transifex 2017-07-15 02:18:35 +02:00
Jenkins for ownCloud
910402fa91 [tx-robot] updated from transifex 2017-07-14 02:18:32 +02:00
Jenkins for ownCloud
276e3d6d21 [tx-robot] updated from transifex 2017-07-13 02:18:30 +02:00
Jenkins for ownCloud
c9db5d234f [tx-robot] updated from transifex 2017-07-12 02:18:29 +02:00
Samuel Alfageme
4fd773d4ae More refs. to corresponding issue/PR on 2.3.3 changelog 2017-07-11 17:29:49 +02:00
Markus Goetz
5d67271acd ChangeLog: 2.3.3 2017-07-11 17:18:56 +02:00
Jenkins for ownCloud
f52cefaa94 [tx-robot] updated from transifex 2017-07-11 02:18:29 +02:00
Jenkins for ownCloud
2c127ae2d5 [tx-robot] updated from transifex 2017-07-10 02:18:29 +02:00
Jenkins for ownCloud
7db4455592 [tx-robot] updated from transifex 2017-07-09 02:18:29 +02:00
Jenkins for ownCloud
0d926f7632 [tx-robot] updated from transifex 2017-07-08 02:18:29 +02:00
Jenkins for ownCloud
383ba63c5a [tx-robot] updated from transifex 2017-07-07 02:18:31 +02:00
Jenkins for ownCloud
4e5e290ec2 [tx-robot] updated from transifex 2017-07-07 01:15:16 +02:00
Jenkins for ownCloud
01b3cde79b [tx-robot] updated from transifex 2017-07-06 02:18:28 +02:00
Jenkins for ownCloud
5b0fea195d [tx-robot] updated from transifex 2017-07-05 02:18:35 +02:00
Markus Goetz
f4d1a07b72 SyncEngine: Keep local size in SyncItem #5855 2017-07-04 11:42:44 +02:00
Jenkins for ownCloud
99f5580c37 [tx-robot] updated from transifex 2017-07-04 02:18:29 +02:00
Markus Goetz
f49985697b TestSyncJournalDB: Fix concurrent usage on CI 2017-07-03 14:08:39 +02:00
Jenkins for ownCloud
2a410217e2 [tx-robot] updated from transifex 2017-07-03 02:18:29 +02:00
Jenkins for ownCloud
2c0e820d9a [tx-robot] updated from transifex 2017-07-02 02:18:29 +02:00
Jenkins for ownCloud
2326ea77e6 [tx-robot] updated from transifex 2017-07-01 02:18:28 +02:00
Jenkins for ownCloud
e6984f4058 [tx-robot] updated from transifex 2017-06-30 02:18:46 +02:00
Samuel Alfageme
aeea27b57b Update central.owncloud.org link
Desktop client category was renamed, old link was 404 - see: https://central.owncloud.org/t/new-central-categories-you-decide
2017-06-29 17:54:42 +02:00
Jenkins for ownCloud
e8f95743cc [tx-robot] updated from transifex 2017-06-29 02:22:16 +02:00
Jenkins for ownCloud
fd0b8f3583 [tx-robot] updated from transifex 2017-06-28 02:22:09 +02:00
Jenkins for ownCloud
2a52b087fd [tx-robot] updated from transifex 2017-06-27 02:22:10 +02:00
Jenkins for ownCloud
c70cdd61ca [tx-robot] updated from transifex 2017-06-26 02:22:09 +02:00
Jenkins for ownCloud
5979db1270 [tx-robot] updated from transifex 2017-06-25 02:22:09 +02:00
Jenkins for ownCloud
0edc29dc72 [tx-robot] updated from transifex 2017-06-24 02:22:16 +02:00
Jenkins for ownCloud
5e4aaab91b [tx-robot] updated from transifex 2017-06-23 02:22:09 +02:00
Jenkins for ownCloud
6a298d180d [tx-robot] updated from transifex 2017-06-22 02:22:09 +02:00
Markus Goetz
bc946053a3 Jenkinsfile: Compile in debug because of all the asserts 2017-06-21 15:02:26 +02:00
Markus Goetz
cd5ad7db64 Jenkinsfile: Run full testing 2017-06-21 12:12:08 +02:00
Markus Goetz
1332e7d66a Jenkinsfile: 2.3.3 will ship with Qt 5.
This should fix the current CI run too
2017-06-21 11:59:24 +02:00
Jenkins for ownCloud
949e8e5f51 [tx-robot] updated from transifex 2017-06-21 02:22:08 +02:00
Christian Kamm
1e78a14f1a Ignore ui: Add the sync journal patterns #5844
The ignore patterns for the journal files are hardcoded. Add them to
the UI to make them discoverable.
2017-06-20 13:35:34 +02:00
Christian Kamm
4291ea47f7 Journal: Don't use a ._ path if it won't work #5633
When synchronizing a folder on a samba share, creating files that begin
with ._ is often forbidden. This prevented the client from creating
its ._sync_abcdef.db file.

Now, it'll check whether the preferred filename is creatable, and if
it isn't it'll use .sync_abcdef.db instead.

The disadvantage is that this alternative path won't be ignored by
older clients - that was the reason for the ._ prefix.
2017-06-20 13:35:34 +02:00
Jenkins for ownCloud
b50706a7aa [tx-robot] updated from transifex 2017-06-20 02:22:12 +02:00
Jocelyn Turcotte
b20f87eef3 shell/Windows: Update binaries to build 45 2017-06-19 12:11:11 +02:00
Frederik Juul Christiani
bc2e1a53cb shell_integration/windows: Create _newQueries as a non-signaled auto-reset event.
Since ResetEvent() is never called, the call to WaitForMultipleObjects()
can always return immediately once the event has been signaled.
2017-06-19 12:11:11 +02:00
Frederik Juul Christiani
e7d4d12e16 Initialize stop variable.
Avoid stopping the worker thread immediately if the stop variable happens to be true.
2017-06-19 12:11:11 +02:00
Jenkins for ownCloud
f348a7d4f4 [tx-robot] updated from transifex 2017-06-19 02:22:08 +02:00
Jenkins for ownCloud
9c82c36c71 [tx-robot] updated from transifex 2017-06-18 02:22:08 +02:00
Jenkins for ownCloud
480388133e [tx-robot] updated from transifex 2017-06-17 02:22:17 +02:00
Jenkins for ownCloud
ff79cc9107 [tx-robot] updated from transifex 2017-06-14 02:22:19 +02:00
Jenkins for ownCloud
e86b6b2246 [tx-robot] updated from transifex 2017-06-09 02:22:10 +02:00
Olivier Goffart
18c39197e5 ownsql: fix build on jenkins
sqlite3_system_errno was only added in sqlite 3.12

(cherry picked from commit e2e56f45af)
2017-06-08 12:53:45 +02:00
Christian Kamm
7eb8219419 Add extra logging for SQLITE_CANTOPEN errors #5633
(cherry picked from commit 05c1dcef9b)
2017-06-08 12:52:58 +02:00
Jenkins for ownCloud
2f915af690 [tx-robot] updated from transifex 2017-06-08 02:22:10 +02:00
Jenkins for ownCloud
272898a792 [tx-robot] updated from transifex 2017-06-07 02:22:13 +02:00
Jenkins for ownCloud
68ee08440e [tx-robot] updated from transifex 2017-06-05 02:22:03 +02:00
Jenkins for ownCloud
b02b99003a [tx-robot] updated from transifex 2017-06-03 02:22:02 +02:00
Jenkins for ownCloud
e3306abbcb [tx-robot] updated from transifex 2017-06-02 02:22:13 +02:00
Jenkins for ownCloud
61d05fa4d7 [tx-robot] updated from transifex 2017-05-31 02:22:17 +02:00
Dominik Schmidt
0fc3df45ce Remove obsolete FindQtKeychain for Qt4 2017-05-29 21:44:25 +02:00
Dominik Schmidt
78dede2ac4 Fix build on Debian 7 (CMake pre 2.8.12) 2017-05-29 21:44:25 +02:00
Christian Kamm
577a2715bd Download: Retrigger folder discovery on 404
See owncloud/enterprise#1966

If the server and the client's database go out of sync, there could be
persistent 404 errors. This change ensures that the problem corrects
itself eventually by triggering a remote discovery of the file's
parent folders.

It does not address the root cause that might have lead to the
divergence.
2017-05-29 21:41:10 +02:00
Jenkins for ownCloud
56de50de28 [tx-robot] updated from transifex 2017-05-25 02:22:08 +02:00
Jenkins for ownCloud
a48785ee5e [tx-robot] updated from transifex 2017-05-24 02:22:16 +02:00
Jenkins for ownCloud
3be73ad1ca [tx-robot] updated from transifex 2017-05-23 02:22:15 +02:00
Christian Kamm
c1d2a9ab92 Sharing: Show warning that link shares are public #5785 #5747
Backport of 3872e060ba33913e43714776a1afce787e772351
2017-05-22 10:28:16 +02:00
Christian Kamm
87a7642381 Settings: Ensure the 'about' label isn't cut off #5760 2017-05-22 10:11:09 +02:00
Christian Kamm
9b4e00c3fc mirall.desktop.in: Remove superfluous lines #5767 2017-05-22 09:59:13 +02:00
Jenkins for ownCloud
97a4302b58 [tx-robot] updated from transifex 2017-05-22 02:22:15 +02:00
Jenkins for ownCloud
bac5121221 [tx-robot] updated from transifex 2017-05-21 02:22:14 +02:00
Jenkins for ownCloud
3462b1d1a3 [tx-robot] updated from transifex 2017-05-20 02:22:15 +02:00
Jenkins for ownCloud
54cc1cdcf7 [tx-robot] updated from transifex 2017-05-20 01:18:15 +02:00
Jenkins for ownCloud
0fd678e9a6 [tx-robot] updated from transifex 2017-05-19 02:22:22 +02:00
Jenkins for ownCloud
580762b4e6 [tx-robot] updated from transifex 2017-05-18 02:22:27 +02:00
Jenkins for ownCloud
c09a828f7b [tx-robot] updated from transifex 2017-05-17 02:22:16 +02:00
Christian Kamm
c5a0ce5a43 Selective sync: Skip excluded folders when reading db
When a new folder becomes selective-sync excluded, we already mark it
and all its parent folders with _invalid_ etags to force rediscovery.

That's not enough however. Later calls to csync_statedb_get_below_path
could still pull data about the excluded files into the remote tree.

That lead to incorrect behavior, such as uploads happening for folders
that had been explicitly excluded from sync.

To fix the problem, statedb_get_below_path is adjusted to not read the
data about excluded folders from the database.

Currently we can't wipe this data from the database outright because we
need it to determine whether the files in the excluded folder can be
wiped away or not.

See owncloud/enterprise#1965
2017-05-16 13:58:45 +02:00
Jenkins for ownCloud
6d74601cf3 [tx-robot] updated from transifex 2017-05-16 02:22:31 +02:00
Jenkins for ownCloud
557931f207 [tx-robot] updated from transifex 2017-05-12 02:18:31 +02:00
Matthew Setter
84e9400742 Add explanation of how to replace local sync folder to FAQ
This fixes owncloud/documentation/issues/2923.

(cherry picked from commit 6580af65c1)
2017-05-11 12:07:33 +02:00
Jenkins for ownCloud
45f831da4c [tx-robot] updated from transifex 2017-05-11 02:18:31 +02:00
Jenkins for ownCloud
55dfbb9446 [tx-robot] updated from transifex 2017-05-10 02:18:36 +02:00
Markus Goetz
8e1422fb37 VERSION.cmake: This is 2.3.3 now 2017-05-09 12:23:52 +02:00
Jenkins for ownCloud
6a378a6362 [tx-robot] updated from transifex 2017-05-09 02:18:36 +02:00
Jocelyn Turcotte
879dadba78 Use QTemporaryDir in TestOwnSql
This will improve the cleanup and possibly help for #5366.
2017-05-08 23:18:06 +02:00
Jocelyn Turcotte
5266720c62 Jenkinsfile: Also use 4 parallel jobs for linux builds 2017-05-08 23:18:06 +02:00
Jocelyn Turcotte
dca2b67338 Favor QtKeychain installed together with Qt
By default we will look in /usr/lib, which would prevent us from
using a different path for Qt as QtKeychain depends on Qt itself.
2017-05-08 23:18:06 +02:00
Markus Goetz
ea691aa2a0 ChangeLog: 2.3.2 2017-05-08 15:50:09 +02:00
Jenkins for ownCloud
9597c2b808 [tx-robot] updated from transifex 2017-05-08 02:18:29 +02:00
Jenkins for ownCloud
3817202b9c [tx-robot] updated from transifex 2017-05-07 02:18:30 +02:00
Jenkins for ownCloud
ed960e5a71 [tx-robot] updated from transifex 2017-05-06 02:18:30 +02:00
Jenkins for ownCloud
8b08ca2d00 [tx-robot] updated from transifex 2017-05-05 02:18:28 +02:00
Jenkins for ownCloud
b20adf2281 [tx-robot] updated from transifex 2017-05-04 02:18:38 +02:00
Jenkins for ownCloud
b02f724e7e [tx-robot] updated from transifex 2017-05-03 02:18:29 +02:00
Jenkins for ownCloud
6d2f77851e [tx-robot] updated from transifex 2017-05-02 02:18:27 +02:00
Jenkins for ownCloud
131055aefc [tx-robot] updated from transifex 2017-05-01 02:18:29 +02:00
Jenkins for ownCloud
0682f8793c [tx-robot] updated from transifex 2017-04-30 02:18:28 +02:00
Jenkins for ownCloud
fdf4a53283 [tx-robot] updated from transifex 2017-04-29 02:18:29 +02:00
Jenkins for ownCloud
ccc1db02a0 [tx-robot] updated from transifex 2017-04-28 02:18:30 +02:00
Jenkins for ownCloud
4e15e2055c [tx-robot] updated from transifex 2017-04-27 02:18:30 +02:00
Christian Kamm
f8c0e796df SqlDatabase: Ask freeSpace for directory, fix for Windows
See owncloud/enterprise#1955
2017-04-26 12:38:04 +02:00
Jenkins for ownCloud
fd40113e48 [tx-robot] updated from transifex 2017-04-26 02:18:39 +02:00
Jenkins for ownCloud
ca8b961e60 [tx-robot] updated from transifex 2017-04-25 02:18:37 +02:00
Markus Goetz
b6e3709e74 ChangeLog for 2.3.2 2017-04-24 12:08:36 +02:00
Jenkins for ownCloud
fd97a09e64 [tx-robot] updated from transifex 2017-04-24 02:18:29 +02:00
Jenkins for ownCloud
42d2594071 [tx-robot] updated from transifex 2017-04-23 02:18:28 +02:00
Jenkins for ownCloud
ff70cf9b5f [tx-robot] updated from transifex 2017-04-22 02:18:28 +02:00
Jenkins for ownCloud
9d06e99b58 [tx-robot] updated from transifex 2017-04-21 02:18:30 +02:00
ckamm
543e8a224c Fix a crash in ProxyAuthHandler (#5711)
See
https://sentry.io/owncloud/desktop-win-and-mac/issues/243433178/activity/
https://sentry.io/owncloud/desktop-win-and-mac/issues/234182688/activity/

The problem was that an account's QNetworkAccessManager can be deleted
when reentering the event loop.
2017-04-20 09:21:33 +02:00
ckamm
ea378fe837 FolderStatusModel: Fix crash for empty relativePath (#5713)
The problem was that split("", SkipEmptyParts) is the empty list.

See
https://sentry.io/owncloud/desktop-win-and-mac/issues/251167186/
2017-04-20 09:16:55 +02:00
Markus Goetz
de9ee295be Some Dialogs: Bring to top on tray click #5515 #5566 (#5664)
On my OS X, it might get hidden under other apps while I opened it and then want to quickly
verify something in another app.
2017-04-20 08:55:44 +02:00
Jenkins for ownCloud
3a8d6a6f16 [tx-robot] updated from transifex 2017-04-20 02:18:30 +02:00
Markus Goetz
5ac58d3b83 Server: Parse version from capabilities too #5691 (#5698)
Newer servers will have the option of hiding version, versionstring, edition
and productname. They will always send the full information in the capabilities.
2017-04-19 11:02:03 +02:00
Jenkins for ownCloud
866991df4c [tx-robot] updated from transifex 2017-04-19 02:18:38 +02:00
Jenkins for ownCloud
7613938181 [tx-robot] updated from transifex 2017-04-18 02:18:27 +02:00
Jenkins for ownCloud
4eb4069c15 [tx-robot] updated from transifex 2017-04-17 02:18:28 +02:00
Jenkins for ownCloud
f097e472f4 [tx-robot] updated from transifex 2017-04-16 02:18:27 +02:00
Jenkins for ownCloud
c46b97ec37 [tx-robot] updated from transifex 2017-04-15 02:18:27 +02:00
Jenkins for ownCloud
1994cd7ba2 [tx-robot] updated from transifex 2017-04-14 02:18:37 +02:00
Olivier Goffart
4af45394f9 owncloudcmd: return code depend on sync result
Issue #3936
2017-04-13 10:10:47 +02:00
Jenkins for ownCloud
c1c5a488d0 [tx-robot] updated from transifex 2017-04-13 02:18:32 +02:00
Jenkins for ownCloud
5e18d5cf4e [tx-robot] updated from transifex 2017-04-12 02:18:30 +02:00
Christian Kamm
8a639d39fc ShareDialog: Reenable user input textedit on error #5694 2017-04-11 15:50:32 +02:00
Jenkins for ownCloud
e43425cf16 [tx-robot] updated from transifex 2017-04-11 02:18:28 +02:00
Markus Goetz
26af3ce525 Wizard: Improve folder creation (2) 2017-04-10 16:15:28 +02:00
Jenkins for ownCloud
5f316f8b96 [tx-robot] updated from transifex 2017-04-10 02:18:28 +02:00
Jenkins for ownCloud
35060f4954 [tx-robot] updated from transifex 2017-04-09 02:18:27 +02:00
Jenkins for ownCloud
0b2f1dda48 [tx-robot] updated from transifex 2017-04-08 02:18:38 +02:00
Jenkins for ownCloud
1a555449ec [tx-robot] updated from transifex 2017-04-08 01:15:19 +02:00
Jenkins for ownCloud
5ba61e5399 [tx-robot] updated from transifex 2017-04-07 02:18:29 +02:00
Jenkins for ownCloud
0809703d2b [tx-robot] updated from transifex 2017-04-06 02:18:28 +02:00
Jenkins for ownCloud
55b423fbb5 [tx-robot] updated from transifex 2017-04-06 01:15:15 +02:00
Markus Goetz
e08ec11fd4 Wizard: Improve folder creation 2017-04-05 16:55:52 +02:00
Jenkins for ownCloud
0c2f65a939 [tx-robot] updated from transifex 2017-04-05 02:18:28 +02:00
Christian Kamm
29e34bd2c0 Doc: Update to new sync journal db name #5662 2017-04-04 10:49:26 +02:00
Christian Kamm
6abc2bf72d Transfers: Show a decimal for single digit MB rates #4428 2017-04-04 09:54:06 +02:00
Christian Kamm
a10fe84a83 ShareDialog: Hide the detailed permissions if there is only one #5655 2017-04-04 09:40:48 +02:00
Christian Kamm
7d9c4d052c ShareDialog: Margin and spacing refinements #5627 2017-04-04 09:40:48 +02:00
Christian Kamm
f8d69dfe8e ShareDialog: Fix thumbnail size #5654 2017-04-04 09:40:48 +02:00
Jenkins for ownCloud
ce735d8d68 [tx-robot] updated from transifex 2017-04-04 02:18:31 +02:00
Jenkins for ownCloud
484c8397e3 [tx-robot] updated from transifex 2017-04-03 02:18:28 +02:00
Jenkins for ownCloud
b8de36c585 [tx-robot] updated from transifex 2017-04-02 02:18:27 +02:00
Jenkins for ownCloud
59ba292edd [tx-robot] updated from transifex 2017-04-01 02:18:36 +02:00
Jenkins for ownCloud
bc9c4fe17b [tx-robot] updated from transifex 2017-03-31 02:18:27 +02:00
Jenkins for ownCloud
7253f64d26 [tx-robot] updated from transifex 2017-03-30 02:18:30 +02:00
Markus Goetz
28e9c56a4b Chunking NG: Also send OC-Total-Length on MOVE
For https://github.com/owncloud/core/issues/26988
2017-03-29 19:51:02 +02:00
Jenkins for ownCloud
f1a35527ee [tx-robot] updated from transifex 2017-03-29 02:18:28 +02:00
Olivier Goffart
039ff0ca8e PropagateDownload: fix possible crash
Backtrace looks like this:
Crash: EXCEPTION_ACCESS_VIOLATION_READ at 0x0
  File "propagatedownload.cpp", line 234, in OCC::GETFileJob::slotReadyRead
  File "moc_propagatedownl_CA5CFSHZDTX34X.cpp", line 86, in OCC::GETFileJob::qt_static_metacall
  File "qobject.cpp", line 495, in QMetaCallEvent::placeMetaCall
  File "qobject.cpp", line 1256, in QObject::event
  File "qapplication.cpp", line 3804, in QApplicationPrivate::notify_helper

GETFileJob::slotReadyRead can be called with a QueuedConnection when the
bendwith manager is involved. In that case, if the QNAM was reset
in between, the reply might have been destroyed.
(This is only speculation based on the backtrace)
2017-03-28 18:04:19 +02:00
Olivier Goffart
85afa4788b AccountState: Attempt to fix a crash
Backtrace from the crash reporter:

Crash: EXCEPTION_ACCESS_VIOLATION_READ at 0x21
  File "qcoreapplication.cpp", line 1281, in QCoreApplication::postEvent
  File "qobject.cpp", line 2125, in QObject::deleteLater
  File "connectionvalidator.cpp", line 240, in OCC::ConnectionValidator::reportResult
  File "connectionvalidator.cpp", line 206, in OCC::ConnectionValidator::slotAuthFailed
  File "moc_connectionvalidator.cpp", line 127, in OCC::ConnectionValidator::qt_static_metacall
  File "qobject.cpp", line 3716, in QMetaObject::activate
  File "moc_networkjobs.cpp", line 653, in OCC::PropfindJob::finishedWithError
  File "networkjobs.cpp", line 570, in OCC::PropfindJob::finished

I believe the problem is caused because 'this' was deleted in ConnectionValidator::reportResult
as the signal connectionResult gets emited. The AccountState::slotConnectionValidatorResult
slot does indeed call slotInvalidCredentials which might call {Shibboleth,Http}Credentials::fetchFromKeychain
which might emit fetched directly, which will call AccountState::slotCredentialsFetched
which deletes the _connectionValidator

So use deleteLater when deleting the _connectionValidator, hoping this helps
2017-03-28 18:04:19 +02:00
Jenkins for ownCloud
3ca071c612 [tx-robot] updated from transifex 2017-03-28 02:18:27 +02:00
Jenkins for ownCloud
d78b84a12f [tx-robot] updated from transifex 2017-03-27 02:18:28 +02:00
Olivier Goffart
5c2b185374 VERSION: 2.3.1 was release, this branch is now for 2.3.2 2017-03-25 09:06:59 +01:00
Jenkins for ownCloud
8339ff3c1c [tx-robot] updated from transifex 2017-03-25 02:18:28 +01:00
Jenkins for ownCloud
73e58fa090 [tx-robot] updated from transifex 2017-03-25 01:15:15 +01:00
Jenkins for ownCloud
4e70a14c29 [tx-robot] updated from transifex 2017-03-24 02:18:28 +01:00
Jenkins for ownCloud
14131cf020 [tx-robot] updated from transifex 2017-03-23 02:18:37 +01:00
Jenkins for ownCloud
dd5b36779d [tx-robot] updated from transifex 2017-03-22 02:18:28 +01:00
Jenkins for ownCloud
34bb950889 [tx-robot] updated from transifex 2017-03-21 02:18:29 +01:00
Samuel Alfageme
489efa24f7 Fixing a typo on an issue reference
(cherry picked from commit ed03cdf45a)
2017-03-20 17:29:36 +01:00
Matthew Setter
9840ae9e96 Fix incorrect documentation for the ownCloud command-line client
This fixes #5609.
2017-03-20 17:29:16 +01:00
Samuel Alfageme
d375e9b86c Including some info on the proxy config. in the docs.
This was a request of @michaelstingl to document how to configure the proxy manually via the .cfg file for config provisioning purposes.
- Restructured the bullet points into 3 different tables; I believe it's a cleaner approach; maybe this is also applicable to other sections.
- Would be logical to include also settings on proxy auth?
2017-03-20 11:55:02 +01:00
Olivier Goffart
722918abd6 Folder::showSyncResultPopup: Fix undefined behavior when there is no errors
When there is no errors  _syncResult.firstItemError() is NULL, and accessing
it's _file member is an undefined behavior. (Thankfully, createGuiLog did not
use the string when the count was 0, but we are not supposed to create
null references.

Found with the UB sanitizer:

src/gui/folder.cpp:348:49: runtime error: member access within null pointer of type 'OCC::SyncFileItem'
src/gui/folder.cpp:348:19: runtime error: reference binding to null pointer of type 'const QString'
2017-03-20 11:53:13 +01:00
Jenkins for ownCloud
48fe8d1cb8 [tx-robot] updated from transifex 2017-03-20 02:18:28 +01:00
Jenkins for ownCloud
1000cdda09 [tx-robot] updated from transifex 2017-03-19 02:18:28 +01:00
Jenkins for ownCloud
d71b59b817 [tx-robot] updated from transifex 2017-03-18 02:18:35 +01:00
Jenkins for ownCloud
95b92c12ac [tx-robot] updated from transifex 2017-03-17 02:18:36 +01:00
98 changed files with 9929 additions and 9575 deletions

View File

@@ -1,11 +1,32 @@
ChangeLog
=========
version 2.3.1 (2017-03-2x)
version 2.3.3 (2017-08-XX)
* Chunking NG: Don't use old chunking on new DAV endpoint (#5855)
* Selective Sync: Skip excluded folders when reading DB, don't let them show errors (#5772)
* Settings: Make window bigger so Qt version is always visible (#5760)
* Share links: Show warning that public link shares are public (#5786)
* Downloads: Re-trigger folder discovery on HTTP 404 (#5799)
* Notifications: Propagate "Dismiss" as DELETE to server (#5922)
* Overlay Icons: Fix potential hangs on Windows
* SyncJournalDB: Don't use ._ as filename pattern if that does not work because of SMB storage settings (#5844)
* SyncJournalDB: Log reason for sqlite3 opening errors
* Windows: Fix a memory leak in FileSystem::longWinPath
* Switch Linux build also to Qt 5.6.2 (#5470)
* Stopped maintaining Qt 4 buildability
version 2.3.2 (2017-05-08)
* Fix more crashes (thanks to everyone submitting to our crash reporter!)
* Improve compatibility with server 10.0 (#5691, OC-Total-Length)
* Share dialog: UI improvements, Bring to front on tray click
* owncloudcmd: Align process return value with sync return value (#3936)
* Fix disk free check on Windows when opening the local DB
version 2.3.1 (2017-03-21)
* Fix several crashes (thanks to everyone submitting to our crash reporter!)
* Improve HTTP redirect handling (#5555)
* Blacklist: Escalate repeated soft error to normal error (#5500)
* NTFS: Do not attempt to upload two existing files with similar casing (#5533)
* NTFS: Do not attempt to upload two existing files with similar casing (#5544)
* Fix URL for linking to application password generation for ownCloud 10.0 (#5605)
version 2.3.0 (2017-03-03)

24
Jenkinsfile vendored
View File

@@ -5,36 +5,20 @@ node('CLIENT') {
checkout scm
sh '''git submodule update --init'''
stage 'Qt4'
sh '''rm -rf build
mkdir build
cd build
cmake -DUNIT_TESTING=1 -DBUILD_WITH_QT4=ON ..
make
ctest --output-on-failure'''
stage 'Qt4 - clang'
sh '''rm -rf build
mkdir build
cd build
cmake -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DUNIT_TESTING=1 -DBUILD_WITH_QT4=ON ..
make
ctest --output-on-failure'''
stage 'Qt5'
sh '''rm -rf build
mkdir build
cd build
cmake -DUNIT_TESTING=1 -DBUILD_WITH_QT4=OFF ..
make
cmake -DCMAKE_BUILD_TYPE="Debug" -DUNIT_TESTING=1 -DWITH_TESTING=1 -DBUILD_WITH_QT4=OFF ..
make -j4
ctest --output-on-failure'''
stage 'Qt5 - clang'
sh '''rm -rf build
mkdir build
cd build
cmake -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DUNIT_TESTING=1 -DBUILD_WITH_QT4=OFF ..
make
cmake -DCMAKE_BUILD_TYPE="Debug" -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DUNIT_TESTING=1 -DWITH_TESTING=1 -DBUILD_WITH_QT4=OFF ..
make -j4
ctest --output-on-failure'''

View File

@@ -1,11 +1,11 @@
set( MIRALL_VERSION_MAJOR 2 )
set( MIRALL_VERSION_MINOR 3 )
set( MIRALL_VERSION_PATCH 1 )
set( MIRALL_VERSION_PATCH 3 )
set( MIRALL_VERSION_YEAR 2017 )
set( MIRALL_SOVERSION 0 )
if ( NOT DEFINED MIRALL_VERSION_SUFFIX )
set( MIRALL_VERSION_SUFFIX "rc1") #e.g. beta1, beta2, rc1
set( MIRALL_VERSION_SUFFIX "") #e.g. beta1, beta2, rc1
endif( NOT DEFINED MIRALL_VERSION_SUFFIX )
if( NOT DEFINED MIRALL_VERSION_BUILD )

View File

@@ -9,6 +9,7 @@ StrCpy $PageReinstall_NEW_Field_3 "
StrCpy $PageReinstall_NEW_MUI_HEADER_TEXT_TITLE "Juba paigaldatud"
StrCpy $PageReinstall_NEW_MUI_HEADER_TEXT_SUBTITLE "Vali, kuidas sa soovid paigaldada ${APPLICATION_NAME}."
StrCpy $PageReinstall_OLD_Field_1 "Uuem versioon ${APPLICATION_NAME} on juba paigaldatud! Vanema versiooni paigaldus ei ole soovitatav. Kui tõesti tahad paigaldada vanemat versiooni, siis on parem esmalt eemaldada olemasolev. Vali tehtav toiming ning kliki Jätka."
StrCpy $PageReinstall_SAME_Field_1 "${APPLICATION_NAME} ${VERSION} on juba paigaldatud.$\n$\nVali toiming, mida sa tahad sooritada ning kliki jätkamiseks nuppu Next."
StrCpy $PageReinstall_SAME_Field_2 "Lisa/Taaspaigalda komponente"
StrCpy $PageReinstall_SAME_Field_3 "Desinstalli ${APPLICATION_NAME}"
StrCpy $UNINSTALLER_APPDATA_TITLE "Desinstalli ${APPLICATION_NAME}"
@@ -40,4 +41,3 @@ StrCpy $UAC_UNINSTALLER_REQUIRE_ADMIN "See desinstallija vajab admini ligip
StrCpy $UAC_ERROR_LOGON_SERVICE "Sisselogimisteenus ei tööta, katkestamine!"
StrCpy $INIT_UNINSTALLER_RUNNING "See desinstallija on juba käimas."
StrCpy $SectionGroup_Shortcuts "Otseteed"
StrCpy $PageReinstall_SAME_Field_1 "${APPLICATION_NAME} ${VERSION} is already installed.$\r$\nSelect the operation you want to perform and click Next to continue."

View File

@@ -25,7 +25,7 @@ StrCpy $OPTION_SECTION_SC_QUICK_LAUNCH_SECTION "Raccourci de lancement rapide"
StrCpy $OPTION_SECTION_SC_QUICK_LAUNCH_DetailPrint "Création d'un raccourci de lancement rapide"
StrCpy $OPTION_SECTION_SC_APPLICATION_Desc "Essentiels de ${APPLICATION_NAME}."
StrCpy $OPTION_SECTION_SC_START_MENU_Desc "Raccourci de ${APPLICATION_NAME}"
StrCpy $OPTION_SECTION_SC_DESKTOP_Desc "Raccourci Bureau de ${APPLICATION_NAME}."
StrCpy $OPTION_SECTION_SC_DESKTOP_Desc "Raccourci de bureau pour ${APPLICATION_NAME}."
StrCpy $OPTION_SECTION_SC_QUICK_LAUNCH_Desc "Raccourci de lancement rapide de ${APPLICATION_NAME}."
StrCpy $UNINSTALLER_FILE_Detail "Écriture du désinstallateur"
StrCpy $UNINSTALLER_REGISTRY_Detail "Écriture des clefs de registre du désinstallateur"

View File

@@ -8,7 +8,7 @@ StrCpy $PageReinstall_NEW_Field_2 "Desinstalar antes de instalar"
StrCpy $PageReinstall_NEW_Field_3 "Não desinstale"
StrCpy $PageReinstall_NEW_MUI_HEADER_TEXT_TITLE "Já instalado"
StrCpy $PageReinstall_NEW_MUI_HEADER_TEXT_SUBTITLE "Escolha como pretende instalar ${APPLICATION_NAME}."
StrCpy $PageReinstall_OLD_Field_1 "Uma versão mais recente da aplicação ${APPLICATION_NAME} já está instalada! Não é recomendada a instalação de uma versão mais antiga. Se realmente deseja instalar esta versão, aconselha-se a desinstalação da versão atual primeiro. Selecione a operação que deseja executar e clique em Avançar para continuar."
StrCpy $PageReinstall_OLD_Field_1 "Já está instalada uma versão mais recente de ${APPLICATION_NAME}! Não é recomendada a instalação de uma versão mais antiga. Se realmente desejar instalar esta versão antiga, aconselha-se que desinstale primeiro a versão atual. Selecione a operação que deseja executar e clique em $\"Seguinte$\" para continuar."
StrCpy $PageReinstall_SAME_Field_1 "${APPLICATION_NAME} ${VERSION} já está instalada.$\nSelecione a operação que deseja realizar e clique em 'Seguinte' para continuar."
StrCpy $PageReinstall_SAME_Field_2 "Adicionar/Reinstalar Componentes"
StrCpy $PageReinstall_SAME_Field_3 "Desinstalar ${APPLICATION_NAME}"
@@ -17,8 +17,8 @@ StrCpy $PageReinstall_SAME_MUI_HEADER_TEXT_SUBTITLE "Escolha a opção de manute
StrCpy $SEC_APPLICATION_DETAILS "A instalar o essencial de ${APPLICATION_NAME}."
StrCpy $OPTION_SECTION_SC_SHELL_EXT_SECTION "Integração para Windows Explorer"
StrCpy $OPTION_SECTION_SC_SHELL_EXT_DetailPrint "A instalar integração para Windows Explorer"
StrCpy $OPTION_SECTION_SC_START_MENU_SECTION "Atalho do progama no Menu Inicial"
StrCpy $OPTION_SECTION_SC_START_MENU_DetailPrint "A adicionar o atalho de ${APPLICATION_NAME} ao Menu Inicial."
StrCpy $OPTION_SECTION_SC_START_MENU_SECTION "Atalho do progama no Menu Iniciar"
StrCpy $OPTION_SECTION_SC_START_MENU_DetailPrint "A adicionar o atalho de ${APPLICATION_NAME} no Menu Iniciar."
StrCpy $OPTION_SECTION_SC_DESKTOP_SECTION "Atalho da área de trabalho"
StrCpy $OPTION_SECTION_SC_DESKTOP_DetailPrint "A criar atalhos na área de trabalho"
StrCpy $OPTION_SECTION_SC_QUICK_LAUNCH_SECTION "Atalho de início rápido"

2
binary

Submodule binary updated: 741b49156b...1818b48380

View File

@@ -9,9 +9,19 @@
# QTKEYCHAIN_LIBRARIES - The libraries needed to use QtKeychain
# QTKEYCHAIN_DEFINITIONS - Compiler switches required for using LibXml2
# When we build our own Qt we also need to build QtKeychain with it
# so that it doesn't pull a different Qt version. For that reason
# first look in the Qt lib directory for QtKeychain.
get_target_property(_QTCORE_LIB_PATH Qt5::Core IMPORTED_LOCATION_RELEASE)
# Use PATH here because Debian 7.0 has CMake 2.8.9 and DIRECTORY is only available from 2.8.12+
get_filename_component(QT_LIB_DIR "${_QTCORE_LIB_PATH}" PATH)
find_path(QTKEYCHAIN_INCLUDE_DIR
NAMES
keychain.h
HINTS
${QT_LIB_DIR}/../include
PATH_SUFFIXES
qt5keychain
)
@@ -20,6 +30,8 @@ find_library(QTKEYCHAIN_LIBRARY
NAMES
qt5keychain
lib5qtkeychain
HINTS
${QT_LIB_DIR}
PATHS
/usr/lib
/usr/lib/${CMAKE_ARCH_TRIPLET}

View File

@@ -1,39 +0,0 @@
# (c) 2014 Copyright ownCloud GmbH
# Redistribution and use is allowed according to the terms of the BSD license.
# For details see the accompanying COPYING* file.
# - Try to find QtKeychain
# Once done this will define
# QTKEYCHAIN_FOUND - System has QtKeychain
# QTKEYCHAIN_INCLUDE_DIRS - The QtKeychain include directories
# QTKEYCHAIN_LIBRARIES - The libraries needed to use QtKeychain
# QTKEYCHAIN_DEFINITIONS - Compiler switches required for using LibXml2
find_path(QTKEYCHAIN_INCLUDE_DIR
NAMES
keychain.h
PATH_SUFFIXES
qtkeychain
)
find_library(QTKEYCHAIN_LIBRARY
NAMES
qtkeychain
libqtkeychain
PATHS
/usr/lib
/usr/lib/${CMAKE_ARCH_TRIPLET}
/usr/local/lib
/opt/local/lib
${CMAKE_LIBRARY_PATH}
${CMAKE_INSTALL_PREFIX}/lib
)
include(FindPackageHandleStandardArgs)
# handle the QUIETLY and REQUIRED arguments and set QTKEYCHAIN_FOUND to TRUE
# if all listed variables are TRUE
find_package_handle_standard_args(QtKeychain DEFAULT_MSG
QTKEYCHAIN_LIBRARY QTKEYCHAIN_INCLUDE_DIR)
mark_as_advanced(QTKEYCHAIN_INCLUDE_DIR QTKEYCHAIN_LIBRARY)

View File

@@ -235,6 +235,11 @@ static CSYNC_EXCLUDE_TYPE _csync_excluded_common(c_strlist_t *excludes, const ch
match = CSYNC_FILE_SILENTLY_EXCLUDED;
goto out;
}
rc = csync_fnmatch(".sync_*.db*", bname, 0);
if (rc == 0) {
match = CSYNC_FILE_SILENTLY_EXCLUDED;
goto out;
}
rc = csync_fnmatch(".csync_journal.db*", bname, 0);
if (rc == 0) {
match = CSYNC_FILE_SILENTLY_EXCLUDED;

View File

@@ -439,7 +439,7 @@ int csync_statedb_get_below_path( CSYNC *ctx, const char *path ) {
* In other words, anything that is between path+'/' and path+'0',
* (because '0' follows '/' in ascii)
*/
const char *below_path_query = "SELECT " METADATA_COLUMNS " FROM metadata WHERE path > (?||'/') AND path < (?||'0')";
const char *below_path_query = "SELECT " METADATA_COLUMNS " FROM metadata WHERE path > (?||'/') AND path < (?||'0') ORDER BY path||'/' ASC";
SQLITE_BUSY_HANDLED(sqlite3_prepare_v2(ctx->statedb.db, below_path_query, -1, &stmt, NULL));
ctx->statedb.lastReturnValue = rc;
if( rc != SQLITE_OK ) {
@@ -462,6 +462,36 @@ int csync_statedb_get_below_path( CSYNC *ctx, const char *path ) {
rc = _csync_file_stat_from_metadata_table( &st, stmt);
if( st ) {
/* When selective sync is used, the database may have subtrees with a parent
* whose etag (md5) is _invalid_. These are ignored and shall not appear in the
* remote tree.
* Sometimes folders that are not ignored by selective sync get marked as
* _invalid_, but that is not a problem as the next discovery will retrieve
* their correct etags again and we don't run into this case.
*/
if( c_streq(st->etag, "_invalid_") ) {
CSYNC_LOG(CSYNC_LOG_PRIORITY_TRACE, "%s selective sync excluded", st->path);
char *skipbase = c_strdup(st->path);
skipbase[st->pathlen] = '/';
int skiplen = st->pathlen + 1;
/* Skip over all entries with the same base path. Note that this depends
* strongly on the ordering of the retrieved items. */
do {
csync_file_stat_free(st);
rc = _csync_file_stat_from_metadata_table( &st, stmt);
if( st && strncmp(st->path, skipbase, skiplen) != 0 ) {
break;
}
CSYNC_LOG(CSYNC_LOG_PRIORITY_TRACE, "%s selective sync excluded because the parent is", st->path);
} while( rc == SQLITE_ROW );
/* End of data? */
if( rc != SQLITE_ROW || !st ) {
continue;
}
}
/* Check for exclusion from the tree.
* Note that this is only a safety net in case the ignore list changes
* without a full remote discovery being triggered. */

View File

@@ -157,7 +157,16 @@ static void check_csync_excluded(void **state)
assert_int_equal(rc, CSYNC_FILE_SILENTLY_EXCLUDED);
rc = csync_excluded_no_ctx(csync->excludes, "subdir/._sync_5bdd60bdfcfa.db", CSYNC_FTW_TYPE_FILE);
assert_int_equal(rc, CSYNC_FILE_SILENTLY_EXCLUDED);
rc = csync_excluded_no_ctx(csync->excludes, ".sync_5bdd60bdfcfa.db", CSYNC_FTW_TYPE_FILE);
assert_int_equal(rc, CSYNC_FILE_SILENTLY_EXCLUDED);
rc = csync_excluded_no_ctx(csync->excludes, ".sync_5bdd60bdfcfa.db.ctmp", CSYNC_FTW_TYPE_FILE);
assert_int_equal(rc, CSYNC_FILE_SILENTLY_EXCLUDED);
rc = csync_excluded_no_ctx(csync->excludes, ".sync_5bdd60bdfcfa.db-shm", CSYNC_FTW_TYPE_FILE);
assert_int_equal(rc, CSYNC_FILE_SILENTLY_EXCLUDED);
rc = csync_excluded_no_ctx(csync->excludes, "subdir/.sync_5bdd60bdfcfa.db", CSYNC_FTW_TYPE_FILE);
assert_int_equal(rc, CSYNC_FILE_SILENTLY_EXCLUDED);
/* pattern ]*.directory - ignore and remove */
rc = csync_excluded_no_ctx(csync->excludes, "my.~directory", CSYNC_FTW_TYPE_FILE);

View File

@@ -16,20 +16,50 @@ format. You can overwrite changes using the ownCloud configuration dialog.
.. note:: Use caution when making changes to the ownCloud Client configuration
file. Incorrect settings can produce unintended results.
You can change the following configuration settings in the ``[ownCloud]`` section:
Some interesting values that can be set on the configuration file are:
- ``remotePollInterval`` (default: ``30000``) -- Specifies the poll time for the remote repository in milliseconds.
+----------------------------------------------------------------------------------------------------------------------------------------------------------+
| ``[ownCloud]`` section |
+=================================+===============+========================================================================================================+
| Variable | Default | Meaning |
+---------------------------------+---------------+--------------------------------------------------------------------------------------------------------+
| ``remotePollInterval`` | ``30000`` | Specifies the poll time for the remote repository in milliseconds. |
+---------------------------------+---------------+--------------------------------------------------------------------------------------------------------+
| ``forceSyncInterval`` | ``7200000`` | The duration of no activity after which a synchronization run shall be triggered automatically. |
+---------------------------------+---------------+--------------------------------------------------------------------------------------------------------+
| ``notificationRefreshInterval`` | ``300000`` | Specifies the default interval of checking for new server notifications in milliseconds. |
+---------------------------------+---------------+--------------------------------------------------------------------------------------------------------+
- ``forceSyncInterval`` (default: ``7200000``) -- The duration of no activity after which a synchronization run shall be triggered automatically.
- ``notificationRefreshInterval`` (default: ``300000``) -- Specifies the default interval of checking for new server notifications in milliseconds.
+----------------------------------------------------------------------------------------------------------------------------------------------------------+
| ``[General]`` section |
+=================================+===============+========================================================================================================+
| Variable | Default | Meaning |
+---------------------------------+---------------+--------------------------------------------------------------------------------------------------------+
| ``chunkSize`` | ``5242880`` | Specifies the chunk size of uploaded files in bytes. |
+---------------------------------+---------------+--------------------------------------------------------------------------------------------------------+
| ``promptDeleteAllFiles`` | ``true`` | If a UI prompt should ask for confirmation if it was detected that all files and folders were deleted. |
+---------------------------------+---------------+--------------------------------------------------------------------------------------------------------+
| ``maxLogLines`` | ``20000`` | Specifies the maximum number of log lines displayed in the log window. |
+---------------------------------+---------------+--------------------------------------------------------------------------------------------------------+
| ``timeout`` | ``300`` | The timeout for network connections in seconds. |
+---------------------------------+---------------+--------------------------------------------------------------------------------------------------------+
You can change the following configuration settings in the ``[General]`` section:
- ``chunkSize`` (default: ``5242880``) -- Specifies the chunk size of uploaded files in bytes.
- ``promptDeleteAllFiles`` (default: ``true``) -- If a UI prompt should ask for confirmation if it was detected that all files and folders were deleted.
- ``maxLogLines`` (default: ``20000``) -- Specifies the maximum number of log lines displayed in the log window.
- ``timeout`` (default: ``300``) -- The timeout for network connections in seconds.
+----------------------------------------------------------------------------------------------------------------------------------------------------------+
| ``[Proxy]`` section |
+=================================+===============+========================================================================================================+
| Variable | Default | Meaning |
+---------------------------------+---------------+--------------------------------------------------------------------------------------------------------+
| ``host`` | ``127.0.0.1`` | The address of the proxy server. |
+---------------------------------+---------------+--------------------------------------------------------------------------------------------------------+
| ``port`` | ``8080`` | The port were the proxy is listening. |
+---------------------------------+---------------+--------------------------------------------------------------------------------------------------------+
| ``type`` | ``2`` | ``0`` for System Proxy. |
+ + +--------------------------------------------------------------------------------------------------------+
| | | ``1`` for SOCKS5 Proxy. |
+ + +--------------------------------------------------------------------------------------------------------+
| | | ``2`` for No Proxy. |
+ + +--------------------------------------------------------------------------------------------------------+
| | | ``3`` for HTTP(S) Proxy. |
+---------------------------------+---------------+--------------------------------------------------------------------------------------------------------+

View File

@@ -18,3 +18,32 @@ The sync client has been intentionally limited to sync no deeper than
fifty sub-directories, to help prevent memory problems.
Unfortunately, it, *currently*, does not report an error when this occurs.
However, a UI notification is planned for a future release of ownCloud.
I want to move my local sync folder
-----------------------------------
The ownCloud desktop client does not provide a way to change the local sync directory.
However, it can be done, though it is a bit unorthodox.
Specifically, you have to:
1. Remove the existing connection which syncs to the wrong directory
2. Add a new connection which syncs to the desired directory
image:: images/setup/ownCloud-remove_existing_connection.png
To do so, in the client UI, which you can see above, click the "**Account**" drop-down menu and then click "Remove".
This will display a "**Confirm Account Removal**" dialog window.
image:: images/setup/ownCloud-remove_existing_connection_confirmation_dialog.png
If you're sure, click "**Remove connection**".
Then, click the Account drop-down menu again, and this time click "**Add new**".
image:: images/setup/ownCloud-replacement_connection_wizard.png
This opens the ownCloud Connection Wizard, which you can see above, *but* with an extra option.
This option provides the ability to either: keep the existing data (synced by the previous connection) or to start a clean sync (erasing the existing data).
Make your choice and click "**Connect...**".
This will then step you through the Connection Wizard, just as you did when you setup the previous sync connection, but giving you the opportunity to choose a new sync directory.

Binary file not shown.

After

Width:  |  Height:  |  Size: 54 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 49 KiB

View File

@@ -60,10 +60,9 @@ Other command line switches supported by ``owncloudcmd`` include the following:
Credential Handling
~~~~~~~~~~~~~~~~~~~
``owncloudcmd`` uses the credentials of the GUI synchronization client.
If no client is configured, or if you choose to use a different user to synchronize,
you can specify the user
password setting with the usual URL pattern. For example::
``owncloudcmd`` requires the user to specify the username and password using the standard URL pattern, e.g.,
::
$ owncloudcmd /home/user/my_sync_folder https://carla:secret@server/owncloud/remote.php/webdav/

View File

@@ -55,8 +55,8 @@ Identifying Basic Functionality Problems
---------------------
If you see this error message stop your client, delete the
``.csync_journal.db`` file, and then restart your client.
There is a ``.csync_journal.db`` file inside the folder of every account
``._sync_xxxxxxx.db`` file, and then restart your client.
There is a hidden ``._sync_xxxxxxx.db`` file inside the folder of every account
configured on your client.
.. NOTE::

View File

@@ -2,7 +2,7 @@
Please try to only report a bug if it happens with the latest version
The latest version can be seen by checking the ChangeLog: https://owncloud.org/changelog/desktop/
For support try: https://central.owncloud.org/c/help/desktop-file-sync
For support try: https://central.owncloud.org/c/desktop-client
--->

View File

@@ -9,628 +9,6 @@ Icon=@APPLICATION_EXECUTABLE@
Keywords=@APPLICATION_NAME@;syncing;file;sharing;
X-GNOME-Autostart-Delay=3
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
@@ -854,10 +232,14 @@ Icon[eu]=@APPLICATION_EXECUTABLE@
GenericName[fa]=همسان سازی پوشه‌ها
Name[fa]=@APPLICATION_EXECUTABLE@ نسخه‌ی همسان سازی مشتری
Icon[fa]=@APPLICATION_EXECUTABLE@
Comment[fr]=Application de bureau pour synchroniser des dossiers avec un serveur @APPLICATION_NAME@
Comment[fr]=Synchronisez vos dossiers avec un serveur @APPLICATION_NAME@
GenericName[fr]=Synchronisation de dossier
Name[fr]=Client de synchronisation @APPLICATION_NAME@
Icon[fr]=@APPLICATION_EXECUTABLE@
Comment[gl]=@APPLICATION_NAME@ cliente de sincronización para escritorio
GenericName[gl]=Sincronizar Cartafol
Name[gl]=@APPLICATION_NAME@ cliente de sincronización para escritorio
Icon[gl]=@APPLICATION_EXECUTABLE@
Comment[he]=@APPLICATION_NAME@ לקוח סנכון שולחן עבודה
GenericName[he]=סנכון תיקייה
Name[he]=@APPLICATION_NAME@ לקוח סנכרון שולחן עבודה
@@ -941,7 +323,12 @@ Comment[zh_CN]=@APPLICATION_NAME@ 桌面同步客户端
GenericName[zh_CN]=文件夹同步
Name[zh_CN]=@APPLICATION_NAME@ 桌面同步客户端
Icon[zh_CN]=@APPLICATION_EXECUTABLE@
Comment[zh_HK]=桌面版同步客户端
GenericName[zh_TW]=資料夾同步
Comment[es_AR]=Cliente de sincronización para escritorio @APPLICATION_NAME@
GenericName[es_AR]=Sincronización de directorio
Name[es_AR]=Cliente de sincronización para escritorio @APPLICATION_NAME@
Icon[es_AR]=@APPLICATION_EXECUTABLE@
Comment[lt_LT]=@APPLICATION_NAME@ darbalaukio sinchronizavimo programa
GenericName[lt_LT]=Katalogo sinchnorizacija
Name[lt_LT]=@APPLICATION_NAME@ darbalaukio programa

View File

@@ -172,9 +172,10 @@ void RemotePathChecker::workerThreadLoop()
RemotePathChecker::RemotePathChecker()
: _watchedDirectories(make_shared<const vector<wstring>>())
: _stop(false)
, _watchedDirectories(make_shared<const vector<wstring>>())
, _connected(false)
, _newQueries(CreateEvent(NULL, true, true, NULL))
, _newQueries(CreateEvent(NULL, FALSE, FALSE, NULL))
, _thread([this]{ this->workerThreadLoop(); })
{
}

View File

@@ -2,7 +2,7 @@
// This is the number that will end up in the version window of the DLLs.
// Increment this version before committing a new build if you are today's shell_integration build master.
#define OCEXT_BUILD_NUM 44
#define OCEXT_BUILD_NUM 45
#define STRINGIZE2(s) #s
#define STRINGIZE(s) STRINGIZE2(s)

View File

@@ -469,7 +469,7 @@ restart_sync:
}
Cmd cmd;
QString dbPath = options.source_dir + SyncJournalDb::makeDbName(credentialFreeUrl, folder, user);
QString dbPath = options.source_dir + SyncJournalDb::makeDbName(options.source_dir, credentialFreeUrl, folder, user);
SyncJournalDb db(dbPath);
if (!selectiveSyncList.empty()) {
@@ -478,7 +478,12 @@ restart_sync:
SyncEngine engine(account, options.source_dir, folder, &db);
engine.setIgnoreHiddenFiles(options.ignoreHiddenFiles);
#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)
QObject::connect(&engine, &SyncEngine::finished,
[&app](bool result) { app.exit(result ? EXIT_SUCCESS : EXIT_FAILURE); });
#else
QObject::connect(&engine, SIGNAL(finished(bool)), &app, SLOT(quit()));
#endif
QObject::connect(&engine, SIGNAL(transmissionProgress(ProgressInfo)), &cmd, SLOT(transmissionProgressSlot()));
@@ -505,7 +510,7 @@ restart_sync:
// Have to be done async, else, an error before exec() does not terminate the event loop.
QMetaObject::invokeMethod(&engine, "startSync", Qt::QueuedConnection);
app.exec();
int resultCode = app.exec();
if (engine.isAnotherSyncNeeded() != NoFollowUpSync) {
if (restartCount < options.restartTimes) {
@@ -516,6 +521,6 @@ restart_sync:
qWarning() << "Another sync is needed, but not done because restart count is exceeded" << restartCount;
}
return 0;
return resultCode;
}

View File

@@ -313,10 +313,9 @@ void AccountSettings::slotFolderWizardAccepted()
tr("<p>Could not create local folder <i>%1</i>.")
.arg(QDir::toNativeSeparators(definition.localPath)));
return;
} else {
FileSystem::setFolderMinimumPermissions(definition.localPath);
}
}
FileSystem::setFolderMinimumPermissions(definition.localPath);
}
/* take the value from the definition of already existing folders. All folders have

View File

@@ -281,9 +281,12 @@ void AccountState::slotCredentialsFetched(AbstractCredentials* credentials)
_waitingForNewCredentials = false;
// When new credentials become available we always want to restart the
// connection validation, even if it's currently running.
delete _connectionValidator;
if (_connectionValidator) {
// When new credentials become available we always want to restart the
// connection validation, even if it's currently running.
_connectionValidator->deleteLater();
_connectionValidator = 0;
}
checkConnectivity();
}
@@ -298,9 +301,12 @@ void AccountState::slotCredentialsAsked(AbstractCredentials* credentials)
return;
}
// When new credentials become available we always want to restart the
// connection validation, even if it's currently running.
delete _connectionValidator;
if (_connectionValidator) {
// When new credentials become available we always want to restart the
// connection validation, even if it's currently running.
_connectionValidator->deleteLater();
_connectionValidator = 0;
}
checkConnectivity();
}

View File

@@ -438,14 +438,13 @@ void ActivityWidget::slotNotifyServerFinished( const QString& reply, int replyCo
}
endNotificationRequest(job->widget(), replyCode);
// FIXME: remove the widget after a couple of seconds
qDebug() << Q_FUNC_INFO << "Server Notification reply code"<< replyCode << reply;
// if the notification was successful start a timer that triggers
// removal of the done widgets in a few seconds
// Add 200 millisecs to the predefined value to make sure that the timer in
// widget's method readyToClose() has elapsed.
if( replyCode == OCS_SUCCESS_STATUS_CODE ) {
if( replyCode == OCS_SUCCESS_STATUS_CODE || replyCode == OCS_SUCCESS_STATUS_CODE_V2 ) {
scheduleWidgetToRemove( job->widget() );
}
}

View File

@@ -70,17 +70,19 @@ void HttpCredentialsGui::askFromUserAsync()
QString HttpCredentialsGui::requestAppPasswordText(const Account* account)
{
if (account->serverVersionInt() < Account::makeServerVersion(9, 1, 0)) {
int version = account->serverVersionInt();
QString path;
// Version may not be available before login on new servers!
if (!version || version >= Account::makeServerVersion(10, 0, 0)) {
path = QLatin1String("/index.php/settings/personal?sectionid=security#apppasswords");
} else if (version >= Account::makeServerVersion(9, 1, 0)) {
path = QLatin1String("/index.php/settings/personal?section=apppasswords");
} else {
// Older server than 9.1 does not have the feature to request App Password
return QString();
}
QString path;
if (account->serverVersionInt() < Account::makeServerVersion(10, 0, 0)) {
path = QLatin1String("/index.php/settings/personal?section=apppasswords");
} else {
path = QLatin1String("/index.php/settings/personal?sectionid=security#apppasswords");
}
return tr("<a href=\"%1\">Click here</a> to request an app password from the web interface.")
.arg(account->url().toString() + path);
}

View File

@@ -345,7 +345,9 @@ void Folder::showSyncResultPopup()
if( _syncResult.firstConflictItem() ) {
createGuiLog( _syncResult.firstConflictItem()->_file, LogStatusConflict, _syncResult.numConflictItems() );
}
createGuiLog( _syncResult.firstItemError()->_file, LogStatusError, _syncResult.numErrorItems() );
if (int errorCount = _syncResult.numErrorItems()) {
createGuiLog( _syncResult.firstItemError()->_file, LogStatusError, errorCount );
}
qDebug() << "OO folder slotSyncFinished: result: " << int(_syncResult.status());
}
@@ -909,6 +911,7 @@ void Folder::slotAboutToRemoveAllFiles(SyncFileItem::Direction dir, bool *cancel
}
*cancel = msgBox.clickedButton() == keepBtn;
if (*cancel) {
FileSystem::setFolderMinimumPermissions(path());
journalDb()->clearFileTable();
_lastEtag.clear();
slotScheduleThisFolder();
@@ -1000,7 +1003,7 @@ QString FolderDefinition::absoluteJournalPath() const
QString FolderDefinition::defaultJournalPath(AccountPtr account)
{
return SyncJournalDb::makeDbName(account->url(), targetPath, account->credentials()->user());
return SyncJournalDb::makeDbName(localPath, account->url(), targetPath, account->credentials()->user());
}
} // namespace OCC

View File

@@ -235,11 +235,22 @@ void FolderMan::setupFoldersHelper(QSettings &settings, AccountStatePtr account,
foreach (const auto& folderAlias, settings.childGroups()) {
FolderDefinition folderDefinition;
if (FolderDefinition::load(settings, folderAlias, &folderDefinition)) {
auto defaultJournalPath = folderDefinition.defaultJournalPath(account->account());
// Migration: Old settings don't have journalPath
if (folderDefinition.journalPath.isEmpty()) {
folderDefinition.journalPath = folderDefinition.defaultJournalPath(account->account());
folderDefinition.journalPath = defaultJournalPath;
}
folderDefinition.defaultJournalPath(account->account());
// Migration: ._ files sometimes don't work
// So if the configured journalPath is the default one ("._sync_*.db")
// but the current default doesn't have the underscore, switch to the
// new default. See SyncJournalDb::makeDbName().
if (folderDefinition.journalPath.startsWith("._sync_")
&& defaultJournalPath.startsWith(".sync_")) {
folderDefinition.journalPath = defaultJournalPath;
}
// Migration: If an old db is found, move it to the new name.
if (backwardsCompatible) {
SyncJournalDb::maybeMigrateDb(folderDefinition.localPath, folderDefinition.absoluteJournalPath());

View File

@@ -652,7 +652,7 @@ void FolderStatusModel::slotUpdateDirectories(const QStringList &list)
newInfo._size = job->_sizes.value(path);
newInfo._isExternal = permissionMap.value(removeTrailingSlash(path)).toString().contains("M");
newInfo._path = relativePath;
newInfo._name = relativePath.split('/', QString::SkipEmptyParts).last();
newInfo._name = removeTrailingSlash(relativePath).split('/').last();
if (relativePath.isEmpty())
continue;

View File

@@ -171,7 +171,8 @@ void FolderWatcherPrivate::slotReceivedNotification(int fd)
// qDebug() << Q_FUNC_INFO << event->name;
if (fileName.startsWith("._sync_") ||
fileName.startsWith(".csync_journal.db") ||
fileName.startsWith(".owncloudsync.log")) {
fileName.startsWith(".owncloudsync.log") ||
fileName.startsWith(".sync_")) {
// qDebug() << "ignore journal";
} else {
const QString p = _watches[event->wd] + '/' + fileName;

View File

@@ -152,6 +152,12 @@
<layout class="QVBoxLayout" name="verticalLayout_3">
<item>
<widget class="QLabel" name="aboutLabel">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>About</string>
</property>

View File

@@ -48,6 +48,9 @@ IgnoreListEditor::IgnoreListEditor(QWidget *parent) :
"and cannot be modified in this view.")
.arg(QDir::toNativeSeparators(cfgFile.excludeFile(ConfigFile::SystemScope)));
addPattern(".csync_journal.db*", /*deletable=*/false, /*readonly=*/true);
addPattern("._sync_*.db*", /*deletable=*/false, /*readonly=*/true);
addPattern(".sync_*.db*", /*deletable=*/false, /*readonly=*/true);
readIgnoreFile(cfgFile.excludeFile(ConfigFile::SystemScope), true);
readIgnoreFile(cfgFile.excludeFile(ConfigFile::UserScope), false);

View File

@@ -125,8 +125,8 @@ void NotificationWidget::slotNotificationRequestFinished(int statusCode)
QString timeStr = locale.toString(QTime::currentTime());
// the ocs API returns stat code 100 if it succeeded.
if( statusCode != OCS_SUCCESS_STATUS_CODE ) {
// the ocs API returns stat code 100 or 200 inside the xml if it succeeded.
if( statusCode != OCS_SUCCESS_STATUS_CODE && statusCode != OCS_SUCCESS_STATUS_CODE_V2 ) {
qDebug() << Q_FUNC_INFO << "Notification Request to Server failed, leave button visible.";
for( i = 0; i < _buttons.count(); i++ ) {
_buttons.at(i)->setEnabled(true);

View File

@@ -25,6 +25,7 @@ OcsJob::OcsJob(AccountPtr account)
: AbstractNetworkJob(account, "")
{
_passStatusCodes.append(OCS_SUCCESS_STATUS_CODE);
_passStatusCodes.append(OCS_SUCCESS_STATUS_CODE_V2);
setIgnoreCredentialFailure(true);
}

View File

@@ -24,6 +24,8 @@
#include <QUrl>
#define OCS_SUCCESS_STATUS_CODE 100
// Apparantly the v2.php URLs can return that
#define OCS_SUCCESS_STATUS_CODE_V2 200
namespace OCC {

View File

@@ -174,22 +174,31 @@ void ownCloudGui::slotTrayClicked( QSystemTrayIcon::ActivationReason reason )
last_click.start();
}
// A click on the tray icon should only open the status window on Win and
// Linux, not on Mac. They want a menu entry.
#if !defined Q_OS_MAC
// Left click
if( reason == QSystemTrayIcon::Trigger ) {
// Start settings if config is existing.
slotOpenSettingsDialog();
}
if (OwncloudSetupWizard::bringWizardToFrontIfVisible()) {
// brought wizard to front
} else if (_shareDialogs.size() > 0) {
// Share dialog(s) be hidden by other apps, bring them back
Q_FOREACH(const QPointer<ShareDialog> &shareDialog, _shareDialogs) {
Q_ASSERT(shareDialog.data());
raiseDialog(shareDialog);
}
} else {
#ifdef Q_OS_MAC
// on macOS, a left click always opens menu.
// However if the settings dialog is already visible but hidden
// by other applications, this will bring it to the front.
if (!_settingsDialog.isNull() && _settingsDialog->isVisible()) {
raiseDialog(_settingsDialog.data());
}
#else
// On Mac, if the settings dialog is already visible but hidden
// by other applications, this will bring it to the front.
if( reason == QSystemTrayIcon::Trigger ) {
if (!_settingsDialog.isNull() && _settingsDialog->isVisible()) {
slotShowSettings();
slotOpenSettingsDialog();
#endif
}
}
#endif
// FIXME: Also make sure that any auto updater dialogue https://github.com/owncloud/client/issues/5613
// or SSL error dialog also comes to front.
}
void ownCloudGui::slotSyncStateChange( Folder* folder )

View File

@@ -32,6 +32,7 @@
#include "accountmanager.h"
#include "clientproxy.h"
#include "filesystem.h"
#include "owncloudgui.h"
#include "creds/credentialsfactory.h"
#include "creds/abstractcredentials.h"
@@ -64,10 +65,10 @@ OwncloudSetupWizard::~OwncloudSetupWizard()
_ocWizard->deleteLater();
}
static QPointer<OwncloudSetupWizard> wiz = 0;
void OwncloudSetupWizard::runWizard(QObject* obj, const char* amember, QWidget *parent)
{
static QPointer<OwncloudSetupWizard> wiz;
if (!wiz.isNull()) {
return;
}
@@ -78,6 +79,16 @@ void OwncloudSetupWizard::runWizard(QObject* obj, const char* amember, QWidget *
wiz->startWizard();
}
bool OwncloudSetupWizard::bringWizardToFrontIfVisible()
{
if (wiz.isNull()) {
return false;
}
ownCloudGui::raiseDialog(wiz->_ocWizard);
return true;
}
void OwncloudSetupWizard::startWizard()
{
AccountPtr account = AccountManager::createAccount();
@@ -183,6 +194,8 @@ void OwncloudSetupWizard::slotOwnCloudFoundAuth(const QUrl& url, const QVariantM
Utility::escape(CheckServerJob::versionString(info)),
Utility::escape(serverVersion)));
// Note with newer servers we get the version actually only later in capabilities
// https://github.com/owncloud/core/pull/27473/files
_ocWizard->account()->setServerVersion(serverVersion);
QString p = url.path();
@@ -368,6 +381,7 @@ void OwncloudSetupWizard::slotCreateLocalAndRemoteFolders(const QString& localFo
bool nextStep = true;
if( fi.exists() ) {
FileSystem::setFolderMinimumPermissions(localFolder);
// there is an existing local folder. If its non empty, it can only be synced if the
// ownCloud is newly created.
_ocWizard->appendToConfigurationLog(

View File

@@ -60,6 +60,7 @@ class OwncloudSetupWizard : public QObject
public:
/** Run the wizard */
static void runWizard(QObject *obj, const char* amember, QWidget *parent = 0 );
static bool bringWizardToFrontIfVisible();
signals:
// overall dialog close signal.
void ownCloudWizardDone( int );

View File

@@ -81,9 +81,14 @@ void ProxyAuthHandler::handleProxyAuthenticationRequired(
}
// Find the responsible QNAM if possible.
QNetworkAccessManager* sending_qnam = qobject_cast<QNetworkAccessManager*>(sender());
QNetworkAccessManager* sending_qnam = 0;
QWeakPointer<QNetworkAccessManager> qnam_alive;
if (Account* account = qobject_cast<Account*>(sender())) {
sending_qnam = account->networkAccessManager();
// Since we go into an event loop, it's possible for the account's qnam
// to be destroyed before we get back. We can use this to check for its
// liveness.
qnam_alive = account->sharedNetworkAccessManager();
sending_qnam = qnam_alive.data();
}
if (!sending_qnam) {
qDebug() << "Could not get the sending QNAM for" << sender();
@@ -122,6 +127,7 @@ void ProxyAuthHandler::handleProxyAuthenticationRequired(
qDebug() << "got creds for" << _proxy;
authenticator->setUser(_username);
authenticator->setPassword(_password);
sending_qnam = qnam_alive.data();
if (sending_qnam) {
_gaveCredentialsTo.insert(sending_qnam);
connect(sending_qnam, SIGNAL(destroyed(QObject*)),

View File

@@ -21,6 +21,8 @@
namespace OCC
{
const QString notificationsPath = QLatin1String("ocs/v2.php/apps/notifications/api/v1/notifications");
ServerNotificationHandler::ServerNotificationHandler(QObject *parent)
: QObject(parent)
{
@@ -47,7 +49,7 @@ void ServerNotificationHandler::slotFetchNotifications(AccountState *ptr)
}
// if the previous notification job has finished, start next.
_notificationJob = new JsonApiJob( ptr->account(), QLatin1String("ocs/v2.php/apps/notifications/api/v1/notifications"), this );
_notificationJob = new JsonApiJob( ptr->account(), notificationsPath, this );
QObject::connect(_notificationJob.data(), SIGNAL(jsonReceived(QVariantMap, int)),
this, SLOT(slotNotificationsReceived(QVariantMap, int)));
_notificationJob->setProperty("AccountStatePtr", QVariant::fromValue<AccountState*>(ptr));
@@ -94,6 +96,16 @@ void ServerNotificationHandler::slotNotificationsReceived(const QVariantMap& jso
a._links.append(al);
}
// Add another action to dismiss notification on server
// https://github.com/owncloud/notifications/blob/master/docs/ocs-endpoint-v1.md#deleting-a-notification-for-a-user
ActivityLink al;
al._label = tr("Dismiss");
al._link = Utility::concatUrlPath(ai->account()->url(), notificationsPath + "/" + json.value("notification_id").toString()).toString();
al._verb = "DELETE";
al._isPrimary = false;
a._links.append(al);
list.append(a);
}
emit newNotificationList( list );

View File

@@ -32,6 +32,8 @@
namespace OCC {
static const int thumbnailSize = 40;
ShareDialog::ShareDialog(QPointer<AccountState> accountState,
const QString &sharePath,
const QString &localPath,
@@ -67,7 +69,7 @@ ShareDialog::ShareDialog(QPointer<AccountState> accountState,
QFileInfo f_info(_localPath);
QFileIconProvider icon_provider;
QIcon icon = icon_provider.icon(f_info);
_ui->label_icon->setPixmap(icon.pixmap(40,40));
_ui->label_icon->setPixmap(icon.pixmap(thumbnailSize, thumbnailSize));
// Set filename
QFileInfo lPath(_localPath);
@@ -213,6 +215,7 @@ void ShareDialog::slotThumbnailFetched(const int &statusCode, const QByteArray &
QPixmap p;
p.loadFromData(reply, "PNG");
p = p.scaledToHeight(thumbnailSize, Qt::SmoothTransformation);
_ui->label_icon->setPixmap(p);
}

View File

@@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>400</width>
<height>300</height>
<width>408</width>
<height>281</height>
</rect>
</property>
<property name="windowTitle">
@@ -64,7 +64,24 @@
</layout>
</item>
<item>
<layout class="QVBoxLayout" name="shareWidgetsLayout"/>
<layout class="QVBoxLayout" name="shareWidgetsLayout">
<property name="spacing">
<number>10</number>
</property>
</layout>
</item>
<item>
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QDialogButtonBox" name="buttonBox">

View File

@@ -14,11 +14,20 @@
<string>Share NewDocument.odt</string>
</property>
<layout class="QGridLayout" name="gridLayout_3">
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item row="0" column="0">
<layout class="QHBoxLayout" name="horizontalLayout_shareLink">
<property name="topMargin">
<number>10</number>
</property>
<item>
<widget class="QCheckBox" name="checkBox_shareLink">
<property name="text">
@@ -28,7 +37,7 @@
</item>
</layout>
</item>
<item row="3" column="0">
<item row="4" column="0">
<widget class="QLabel" name="errorLabel">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
@@ -81,19 +90,19 @@
</property>
</widget>
</item>
<item row="1" column="0" colspan="2">
<item row="2" column="0" colspan="2">
<widget class="QWidget" name="widget_shareLink" native="true">
<layout class="QGridLayout" name="gridLayout_2">
<property name="leftMargin">
<number>20</number>
</property>
<property name="topMargin">
<number>1</number>
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<item row="3" column="0">
<item row="4" column="0">
<layout class="QHBoxLayout" name="horizontalLayout">
<property name="leftMargin">
<number>20</number>
@@ -120,7 +129,7 @@
</item>
</layout>
</item>
<item row="5" column="0">
<item row="6" column="0">
<layout class="QHBoxLayout" name="horizontalLayout_2">
<property name="leftMargin">
<number>0</number>
@@ -141,7 +150,7 @@
</item>
</layout>
</item>
<item row="2" column="0">
<item row="3" column="0">
<layout class="QHBoxLayout" name="horizontalLayout_password">
<item>
<widget class="QCheckBox" name="checkBox_password">
@@ -171,7 +180,7 @@
</item>
</layout>
</item>
<item row="0" column="0">
<item row="1" column="0">
<layout class="QHBoxLayout" name="horizontalLayout_3">
<property name="sizeConstraint">
<enum>QLayout::SetDefaultConstraint</enum>
@@ -214,7 +223,7 @@
</item>
</layout>
</item>
<item row="1" column="0">
<item row="2" column="0">
<widget class="QWidget" name="widget_editing" native="true">
<layout class="QHBoxLayout" name="horizontalLayout_editing">
<property name="leftMargin">
@@ -252,10 +261,23 @@
</layout>
</widget>
</item>
<item row="0" column="0">
<widget class="QLabel" name="publicLinkWarningLabel">
<property name="text">
<string>Anyone with the link has access to the file/folder</string>
</property>
<property name="textFormat">
<enum>Qt::PlainText</enum>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item row="2" column="1">
<item row="3" column="1">
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>

View File

@@ -280,9 +280,16 @@ void ShareUserGroupWidget::slotCompleterHighlighted(const QModelIndex & index)
void ShareUserGroupWidget::displayError(int code, const QString& message)
{
_pi_sharee.stopAnimation();
// Also remove the spinner in the widget list, if any
foreach (auto pi, _ui->scrollArea->findChildren<QProgressIndicator*>()) {
delete pi;
}
qDebug() << "Error from server" << code << message;
_ui->errorLabel->setText(message);
_ui->errorLabel->show();
_ui->shareeLineEdit->setEnabled(true);
}
ShareWidget::ShareWidget(QSharedPointer<Share> share,
@@ -324,6 +331,11 @@ ShareWidget::ShareWidget(QSharedPointer<Share> share,
QIcon icon(QLatin1String(":/client/resources/more.png"));
_ui->permissionToolButton->setIcon(icon);
// If there's only a single entry in the detailed permission menu, hide it
if (menu->actions().size() == 1) {
_ui->permissionToolButton->hide();
}
// Set the permissions checkboxes
displayPermissions();

View File

@@ -6,14 +6,26 @@
<rect>
<x>0</x>
<y>0</y>
<width>457</width>
<height>164</height>
<width>397</width>
<height>273</height>
</rect>
</property>
<property name="windowTitle">
<string>Share NewDocument.odt</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<layout class="QHBoxLayout" name="shareeHorizontalLayout">
<item>
@@ -94,8 +106,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>437</width>
<height>94</height>
<width>395</width>
<height>221</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_3"/>

View File

@@ -202,6 +202,11 @@ QNetworkAccessManager *Account::networkAccessManager()
return _am.data();
}
QSharedPointer<QNetworkAccessManager> Account::sharedNetworkAccessManager()
{
return _am;
}
QNetworkReply *Account::sendRequest(const QByteArray &verb, const QUrl &url, QNetworkRequest req, QIODevice *data)
{
req.setUrl(url);

View File

@@ -145,9 +145,21 @@ public:
const Capabilities &capabilities() const;
void setCapabilities(const QVariantMap &caps);
/** Access the server version */
/** Access the server version
*
* For servers >= 10.0.0, this can be the empty string until capabilities
* have been received.
*/
QString serverVersion() const;
/** Server version for easy comparison.
*
* Example: serverVersionInt() >= makeServerVersion(11, 2, 3)
*
* Will be 0 if the version is not available yet.
*/
int serverVersionInt() const;
static int makeServerVersion(int majorVersion, int minorVersion, int patchVersion);
void setServerVersion(const QString &version);
@@ -173,6 +185,7 @@ public:
void resetNetworkAccessManager();
QNetworkAccessManager* networkAccessManager();
QSharedPointer<QNetworkAccessManager> sharedNetworkAccessManager();
/// Called by network jobs on credential errors, emits invalidCredentials()
void handleInvalidCredentials();

View File

@@ -114,26 +114,21 @@ void ConnectionValidator::slotCheckServerAndAuth()
void ConnectionValidator::slotStatusFound(const QUrl&url, const QVariantMap &info)
{
// Newer servers don't disclose any version in status.php anymore
// https://github.com/owncloud/core/pull/27473/files
// so this string can be empty.
QString serverVersion = CheckServerJob::version(info);
// status.php was found.
qDebug() << "** Application: ownCloud found: "
<< url << " with version "
<< CheckServerJob::versionString(info)
<< "(" << CheckServerJob::version(info) << ")";
<< "(" << serverVersion << ")";
QString version = CheckServerJob::version(info);
_account->setServerVersion(version);
// We cannot deal with servers < 5.0.0
if (version.contains('.') && version.split('.')[0].toInt() < 5) {
_errors.append( tr("The configured server for this client is too old") );
_errors.append( tr("Please update to the latest server and restart the client.") );
reportResult( ServerVersionMismatch );
if (!serverVersion.isEmpty() && !setAndCheckServerVersion(serverVersion)) {
return;
}
// We attempt to work with servers >= 5.0.0 but warn users.
// Check usages of Account::serverVersionUnsupported() for details.
// now check the authentication
if (_account->credentials()->ready())
QTimer::singleShot( 0, this, SLOT( checkAuthentication() ));
@@ -235,6 +230,13 @@ void ConnectionValidator::slotCapabilitiesRecieved(const QVariantMap &json)
auto caps = json.value("ocs").toMap().value("data").toMap().value("capabilities");
qDebug() << "Server capabilities" << caps;
_account->setCapabilities(caps.toMap());
// New servers also report the version in the capabilities
QString serverVersion = caps.toMap()["core"].toMap()["status"].toMap()["version"].toString();
if (!serverVersion.isEmpty() && !setAndCheckServerVersion(serverVersion)) {
return;
}
fetchUser();
}
@@ -247,6 +249,26 @@ void ConnectionValidator::fetchUser()
job->start();
}
bool ConnectionValidator::setAndCheckServerVersion(const QString& version)
{
qDebug() << _account->url() << "has server version" << version;
_account->setServerVersion(version);
// We cannot deal with servers < 5.0.0
if (_account->serverVersionInt()
&& _account->serverVersionInt() < Account::makeServerVersion(5, 0, 0)) {
_errors.append( tr("The configured server for this client is too old") );
_errors.append( tr("Please update to the latest server and restart the client.") );
reportResult( ServerVersionMismatch );
return false;
}
// We attempt to work with servers >= 5.0.0 but warn users.
// Check usages of Account::serverVersionUnsupported() for details.
return true;
}
void ConnectionValidator::slotUserFetched(const QVariantMap &json)
{
QString user = json.value("ocs").toMap().value("data").toMap().value("id").toString();

View File

@@ -125,6 +125,12 @@ private:
void checkServerCapabilities();
void fetchUser();
/** Sets the account's server version
*
* Returns false and reports ServerVersionMismatch for very old servers.
*/
bool setAndCheckServerVersion(const QString& version);
QStringList _errors;
AccountPtr _account;
bool _isCheckingServerAndAuth;

View File

@@ -52,12 +52,14 @@ namespace OCC {
QString FileSystem::longWinPath( const QString& inpath )
{
QString path(inpath);
#ifdef Q_OS_WIN
path = QString::fromWCharArray( static_cast<wchar_t*>( c_utf8_path_to_locale(inpath.toUtf8() ) ) );
#endif
const char *unc_str = c_path_to_UNC(inpath.toUtf8());
QString path = QString::fromUtf8(unc_str);
free((void*)unc_str);
return path;
#else
return inpath;
#endif
}
bool FileSystem::fileEquals(const QString& fn1, const QString& fn2)

View File

@@ -474,10 +474,7 @@ bool CheckServerJob::finished()
}
qDebug() << "status.php returns: " << status << " " << reply()->error() << " Reply: " << reply();
if( status.contains("installed")
&& status.contains("version")
&& status.contains("versionstring") ) {
if( status.contains("installed") ) {
emit instanceFound(reply()->url(), status);
} else {
qDebug() << "No proper answer on " << reply()->url();

View File

@@ -46,7 +46,7 @@ QString ownCloudTheme::about() const
{
QString devString;
devString = trUtf8("<p>Version %2. For more information visit <a href=\"%3\">https://%4</a></p>"
"<p>For known issues and help, please visit: <a href=\"https://central.owncloud.org/c/help/desktop-file-sync\">https://central.owncloud.org</a></p>"
"<p>For known issues and help, please visit: <a href=\"https://central.owncloud.org/c/desktop-client\">https://central.owncloud.org</a></p>"
"<p><small>By Klaas Freitag, Daniel Molkentin, Olivier Goffart, Markus Götz, "
" Jan-Christoph Borchardt, and others.</small></p>"
"<p>Copyright ownCloud GmbH</p>"

View File

@@ -17,6 +17,8 @@
#include <QString>
#include <QDebug>
#include <QFile>
#include <QFileInfo>
#include <QDir>
#include "ownsql.h"
#include "utility.h"
@@ -55,6 +57,12 @@ bool SqlDatabase::openHelper( const QString& filename, int sqliteFlags )
if( _errId != SQLITE_OK ) {
qDebug() << "Error:" << _error << "for" << filename;
if (_errId == SQLITE_CANTOPEN) {
qDebug() << "CANTOPEN extended errcode: " << sqlite3_extended_errcode(_db);
#if SQLITE_VERSION_NUMBER >= 3012000
qDebug() << "CANTOPEN system errno: " << sqlite3_system_errno(_db);
#endif
}
close();
return false;
}
@@ -101,8 +109,8 @@ bool SqlDatabase::openOrCreateReadWrite( const QString& filename )
if( !checkDb() ) {
// When disk space is low, checking the db may fail even though it's fine.
qint64 freeSpace = Utility::freeDiskSpace(filename);
if (freeSpace < 1000000) {
qint64 freeSpace = Utility::freeDiskSpace(QFileInfo(filename).dir().absolutePath());
if (freeSpace != -1 && freeSpace < 1000000) {
qDebug() << "Consistency check failed, disk space is low, aborting" << freeSpace;
close();
return false;

View File

@@ -231,6 +231,8 @@ qint64 GETFileJob::currentDownloadPosition()
void GETFileJob::slotReadyRead()
{
if (!reply())
return;
int bufferSize = qMin(1024*8ll , reply()->bytesAvailable());
QByteArray buffer(bufferSize, Qt::Uninitialized);
@@ -498,6 +500,11 @@ void PropagateDownloadFile::slotGetFinished()
} else if (fileNotFound) {
job->setErrorString(tr("File was deleted from server"));
job->setErrorStatus(SyncFileItem::SoftError);
// As a precaution against bugs that cause our database and the
// reality on the server to diverge, rediscover this folder on the
// next sync run.
propagator()->_journal->avoidReadFromDbOnNextSync(_item->_file);
}
SyncFileItem::Status status = job->errorStatus();

View File

@@ -292,6 +292,8 @@ void PropagateUploadFileNG::startNextChunk()
_transmissionChecksumType, _transmissionChecksum);
}
headers["OC-Total-Length"] = QByteArray::number(fileSize);
auto job = new MoveJob(propagator()->account(), Utility::concatUrlPath(chunkUrl(), "/.file"),
destination, headers, this);
_jobs.append(job);

View File

@@ -386,8 +386,10 @@ int SyncEngine::treewalkFile( TREE_WALK_FILE *file, bool remote )
if (item->_instruction == CSYNC_INSTRUCTION_NONE
|| (item->_instruction == CSYNC_INSTRUCTION_IGNORE && instruction != CSYNC_INSTRUCTION_NONE)) {
// Take values from side (local/remote) where instruction is not _NONE
item->_instruction = instruction;
item->_modtime = file->modtime;
item->_size = file->size;
} else {
if (instruction != CSYNC_INSTRUCTION_NONE) {
qWarning() << "ERROR: Instruction" << item->_instruction << "vs" << instruction << "for" << fileUtf8;
@@ -517,7 +519,7 @@ int SyncEngine::treewalkFile( TREE_WALK_FILE *file, bool remote )
if (file->etag && file->etag[0]) {
item->_etag = file->etag;
}
item->_size = file->size;
if (!item->_inode) {
item->_inode = file->inode;

View File

@@ -17,6 +17,7 @@
#include <QDebug>
#include <QElapsedTimer>
#include <QUrl>
#include <QDir>
#include "ownsql.h"
@@ -41,7 +42,8 @@ SyncJournalDb::SyncJournalDb(const QString& dbFilePath, QObject *parent) :
}
QString SyncJournalDb::makeDbName(const QUrl& remoteUrl,
QString SyncJournalDb::makeDbName(const QString& localPath,
const QUrl& remoteUrl,
const QString& remotePath,
const QString& user)
{
@@ -56,6 +58,42 @@ QString SyncJournalDb::makeDbName(const QUrl& remoteUrl,
journalPath.append( ba.left(6).toHex() );
journalPath.append(".db");
// If the journal doesn't exist and we can't create a file
// at that location, try again with a journal name that doesn't
// have the ._ prefix.
//
// The disadvantage of that filename is that it will only be ignored
// by client versions >2.3.2.
//
// See #5633: "._*" is often forbidden on samba shared folders.
// If it exists already, the path is clearly usable
QFile file(QDir(localPath).filePath(journalPath));
if (file.exists()) {
return journalPath;
}
// Try to create a file there
if (file.open(QIODevice::ReadWrite)) {
// Ok, all good.
file.close();
file.remove();
return journalPath;
}
// Can we create it if we drop the underscore?
QString alternateJournalPath = journalPath.mid(2).prepend(".");
QFile file2(QDir(localPath).filePath(alternateJournalPath));
if (file2.open(QIODevice::ReadWrite)) {
// The alternative worked, use it
qDebug() << "Using alternate database path" << alternateJournalPath;
file2.close();
file2.remove();
return alternateJournalPath;
}
// Neither worked, just keep the original and throw errors later
qDebug() << "Could not find a writable database path" << file.fileName();
return journalPath;
}

View File

@@ -41,7 +41,8 @@ public:
virtual ~SyncJournalDb();
/// Create a journal path for a specific configuration
static QString makeDbName(const QUrl& remoteUrl,
static QString makeDbName(const QString& localPath,
const QUrl& remoteUrl,
const QString& remotePath,
const QString& user);
@@ -136,6 +137,14 @@ public:
/**
* Make sure that on the next sync, fileName is not read from the DB but uses the PROPFIND to
* get the info from the server
*
* Specifically, this sets the md5 field of fileName and all its parents to _invalid_.
* That causes a metadata difference and a resulting discovery from the remote for the
* affected folders.
*
* Since folders in the selective sync list will not be rediscovered (csync_ftw,
* _csync_detect_update skip them), the _invalid_ marker will stay and it. And any
* child items in the db will be ignored when reading a remote tree from the database.
*/
void avoidReadFromDbOnNextSync(const QString& fileName);

View File

@@ -122,8 +122,8 @@ QString Utility::octetsToString( qint64 octets )
QString s;
qreal value = octets;
// Whether we care about decimals: only for GB and only
// if it's less than 10 GB.
// Whether we care about decimals: only for GB/MB and only
// if it's less than 10 units.
bool round = true;
// do not display terra byte with the current units, as when
@@ -137,6 +137,7 @@ QString Utility::octetsToString( qint64 octets )
} else if (octets >= mb) {
s = QCoreApplication::translate("Utility", "%L1 MB");
value /= mb;
round = false;
} else if (octets >= kb) {
s = QCoreApplication::translate("Utility", "%L1 KB");
value /= kb;

View File

@@ -43,6 +43,12 @@ namespace Utility
OWNCLOUDSYNC_EXPORT QByteArray userAgentString();
OWNCLOUDSYNC_EXPORT bool hasLaunchOnStartup(const QString &appName);
OWNCLOUDSYNC_EXPORT void setLaunchOnStartup(const QString &appName, const QString& guiName, bool launch);
/**
* Return the amount of free space available.
*
* \a path must point to a directory
*/
OWNCLOUDSYNC_EXPORT qint64 freeDiskSpace(const QString &path);
/**

View File

@@ -25,7 +25,6 @@ list(APPEND FolderWatcher_SRC ../src/gui/socketapisocket_mac.mm)
ENDIF()
owncloud_add_test(CSyncSqlite "")
owncloud_add_test(NetrcParser ../src/cmd/netrcparser.cpp)
owncloud_add_test(OwnSql "")
owncloud_add_test(SyncJournalDB "")
owncloud_add_test(SyncFileItem "")
owncloud_add_test(ConcatUrl "")
@@ -35,6 +34,7 @@ owncloud_add_test(ChecksumValidator "")
owncloud_add_test(ExcludedFiles "")
if(HAVE_QT5 AND NOT BUILD_WITH_QT4)
owncloud_add_test(FileSystem "")
owncloud_add_test(OwnSql "")
owncloud_add_test(Utility "")
owncloud_add_test(SyncEngine "syncenginetestutils.h")
owncloud_add_test(SyncFileStatusTracker "syncenginetestutils.h")

View File

@@ -12,37 +12,18 @@
using namespace OCC;
namespace {
const char testdbC[] = "/tmp/testdb.sqlite";
}
class TestOwnSql : public QObject
{
Q_OBJECT
QTemporaryDir _tempDir;
private slots:
void initTestCase() {
QFileInfo fi( testdbC );
if( fi.exists() ) {
QFile::remove(testdbC);
}
fi.refresh();
QVERIFY(!fi.exists());
}
void cleanupTestCase() {
// QFile::remove(testdbC);
}
void testOpenDb() {
QFileInfo fi( testdbC );
QFileInfo fi( _tempDir.path() + "/testdb.sqlite" );
QVERIFY( !fi.exists() ); // must not exist
_db.openOrCreateReadWrite(testdbC);
_db.openOrCreateReadWrite(fi.filePath());
fi.refresh();
QVERIFY(fi.exists());
}
void testCreate() {

View File

@@ -213,6 +213,49 @@ private slots:
}
}
void testSelectiveSyncBug() {
// issue owncloud/enterprise#1965: files from selective-sync ignored
// folders are uploaded anyway is some circumstances.
FakeFolder fakeFolder{FileInfo{ QString(), {
FileInfo { QStringLiteral("parentFolder"), {
FileInfo{ QStringLiteral("subFolder"), {
{ QStringLiteral("fileA.txt"), 400 },
{ QStringLiteral("fileB.txt"), 400, 'o' }
}}
}}
}}};
QCOMPARE(fakeFolder.currentLocalState(), fakeFolder.currentRemoteState());
auto expectedServerState = fakeFolder.currentRemoteState();
// Remove subFolder with selectiveSync:
fakeFolder.syncEngine().journal()->setSelectiveSyncList(SyncJournalDb::SelectiveSyncBlackList,
{"parentFolder/subFolder/"});
fakeFolder.syncEngine().journal()->avoidReadFromDbOnNextSync("parentFolder/subFolder/");
// But touch a local file before the next sync, such that the local folder
// can't be removed
fakeFolder.localModifier().setContents("parentFolder/subFolder/fileB.txt", 'n');
// Several follow-up syncs don't change the state at all,
// in particular the remote state doesn't change and fileB.txt
// isn't uploaded.
for (int i = 0; i < 3; ++i) {
fakeFolder.syncOnce();
{
// Nothing changed on the server
QCOMPARE(fakeFolder.currentRemoteState(), expectedServerState);
// The local state should still have subFolderA
auto local = fakeFolder.currentLocalState();
QVERIFY(local.find("parentFolder/subFolder"));
QVERIFY(local.find("parentFolder/subFolder/fileA.txt"));
QVERIFY(local.find("parentFolder/subFolder/fileB.txt"));
}
}
}
void abortAfterFailedMkdir() {
QSKIP("Skip for 2.3");
FakeFolder fakeFolder{FileInfo{}};

View File

@@ -17,10 +17,11 @@ class TestSyncJournalDB : public QObject
{
Q_OBJECT
QTemporaryDir _tempDir;
public:
TestSyncJournalDB()
: _db("/tmp/csync-test.db")
TestSyncJournalDB() : _db((_tempDir.path() + "/sync.db"))
{
QVERIFY(_tempDir.isValid());
}
QDateTime dropMsecs(QDateTime time)

View File

@@ -40,7 +40,7 @@ private slots:
QCOMPARE(octetsToString(10240) , QString("10 KB"));
QCOMPARE(octetsToString(123456) , QString("121 KB"));
QCOMPARE(octetsToString(1234567) , QString("1 MB"));
QCOMPARE(octetsToString(1234567) , QString("1.2 MB"));
QCOMPARE(octetsToString(12345678) , QString("12 MB"));
QCOMPARE(octetsToString(123456789) , QString("118 MB"));
QCOMPARE(octetsToString(1000LL*1000*1000 * 5) , QString("4.7 GB"));

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff