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

4888 Commits

Author SHA1 Message Date
Olivier Goffart
268fc97a71 Merge pull request #5480 from owncloud/chunking-ng-cleanup
Chunking ng cleanup
2017-01-25 19:19:48 +01:00
Christian Kamm
59c1fdbe05 Shib: Use different keychain entry per account #5469
Previously shib multiaccount didn't work at all because the
session cookie was stored in the same keychain entry.
2017-01-24 13:14:11 +01:00
Christian Kamm
26234dbf6c Folders: Adjust ui when account is disconnected #5477
Previously if you paused/unpaused a folder for a disconnected account
they would prepare to sync and thus display the 'Waiting...' text. With
this change, folders that can't possibly sync don't show text like
this.

When account connectivity changes, all unpaused folders will be
scheduled anyway.
2017-01-24 10:26:03 +01:00
Olivier Goffart
d6fdda8efa ChunkingNG: add '0' padding on the filename (#5476)
The server sorts the chunk by name alphabetically. So if we want to keep
the chunk in order, we need to add a few '0' in front of the chunk name
2017-01-20 16:03:50 +01:00
Olivier Goffart
a63d970e5e ChunkingNG: remove stale chunks when cleaning the uploadInfo table
Stale chunks might be there because a file was removed or would just not
be uploaded, for any reason.
We just start the DeleteJob but we don't care if it success or not.

Relates to https://github.com/owncloud/core/issues/26981

One of the test is testing the case where the file is modified on the server
during the upload. So this test the precondition failed error.
The FakeGetReply logic was modified because resizing a 150MB big QByteArray
by increment of 16k just did not scale when downloading a big file.
2017-01-20 14:48:53 +01:00
Olivier Goffart
f6c77fad17 ChunkingNG: delete stale chunks if the file was changed locally
Relates to https://github.com/owncloud/core/issues/26981

We do not track the success or error of the DeleteJob because it does not
matter. If it fails, it might be because the chunks were already removed.
If not, the chunks will be stale, but the server must anyway do a few
cleanup from time to time because we do not always remove the chunks
2017-01-20 14:48:53 +01:00
Jocelyn Turcotte
b68a28de8d StatusTracker: Emit OK for the last child before parents (#5467)
The current logic tried to avoid a DB lookup just to fetch whether
the file is shared or not since that info is already in the
SyncFileItem. The implementation would however need to decrease the
sync count for itself (and parents) before emitting the new status,
thus emitting the OK status for parents before that last child that
ended the propagation for that folder.

Change the implementation to achieve what we want: give the
possibility to decSyncCount to use a pre-fetched sharing state while
still doing the emission for all involved files. This ensures that
the leaf file also gets its status emitted before its parents.

Issue #4797
2017-01-18 15:40:52 +01:00
Jocelyn Turcotte
d3a0608bd5 SocketAPI: Only push status for files requested by the shell #5361
We currently push the SYNC status for all files that will be propagated,
and then the OK status when those files are propagated.
On top of this, we send those statuses to all clients connected, even
if the socket is kept open by an application that only needed to show
a file open dialog. On macOS we're also using an NSConnection which
means that we have to wait for the RPC call to return from the
extension, which makes bulk status changes possibly heavy.

Reduce the time spent needlessly sending status pushes by limiting
them to files requested through that socket since it connected.
To limit the data to store, only remember the parent directory of
files requested, and store those in a bloom filter.

Note that this adds a requirement to shell extensions: they should
make sure that the status cache only contains entries that have been
requested through the socket API. In other words, the status cache
must be empty when each socket client connects to the socket API.
Otherwise the cached icon type will be shown to the user, and the
SocketAPI won't push new status for that file if it didn't receive
a RETRIEVE_FILE_STATUS.
2017-01-18 12:15:52 +01:00
Jocelyn Turcotte
c25b599bbb SocketApi::slotReadSocket: Small optimizations
- Use the looked-up method index also for the invocation
- Do the method name concatenation already on QByteArray since we'll
  convert anyway
- Use staticMetaObject instead of metaObject()
2017-01-18 12:15:52 +01:00
Jocelyn Turcotte
a5ff9e58e3 SocketAPI: Remove unecessary null-checks
Those methods are private and there is only one call-site, we can
be sure that this parameter won't be null already.
2017-01-18 12:15:52 +01:00
Olivier Goffart
9b96899d75 Sync Engine: Specify what chars are not syncable in the error message #1733 (#5449) 2017-01-18 11:45:46 +01:00
Olivier Goffart
b046cca010 Fix more compilation errors with Qt 4
Ammand last commit which was a fixup to the change from pull request #5468
for issue #5453
2017-01-18 10:19:51 +01:00
Olivier Goffart
edf0a99a8a Fix compilation with Qt 4
Fixup to the change from pull request #5468 for issue #5453
2017-01-18 09:57:36 +01:00
Christian Kamm
352f168313 Folder: Remove unused variable 2017-01-17 14:53:09 +01:00
Markus Goetz
85d3de1589 Disable RTTI
Shrinks owncloud binary by 24 KB and libowncloudsync by 14 KB.
I don't know if it has influence on memory usage or runtime speed though.

Was worth a try.
2017-01-17 14:52:10 +01:00
Markus Goetz
588a88fb63 Updater: Don't create instance for invalid URL
Also don't use dynamic_cast
For enterprise/#689
2017-01-17 14:52:10 +01:00
Christian Kamm
cd9e88ad22 PropagatorJob: Remove unneccessary pointer #5453 2017-01-17 14:47:38 +01:00
Christian Kamm
29b39acfbe PropagatorJob: Access propagator through function #5453 2017-01-17 14:47:38 +01:00
Markus Goetz
9d7425b201 DB: Also migrate -shm and -wal to new name #3764 #5045 (#5459) 2017-01-16 15:42:11 +01:00
Markus Goetz
7eb43d7f7e PropagateUploadFileNG: Delete unused map contents to free memory 2017-01-13 19:00:04 +01:00
ckamm
d76e0ec6d8 Reset stuck chunked uploads eventually #5344 (#5443)
Previously this wasn't happening for errors that were not
NormalErrors because they don't end up in the blacklist.

This revises the resetting logic to be independent of the
error blacklist and make use of UploadInfo::errorCount
instead.

412 errors should reset chunked uploads because they might be
indicative of a checksum error.

Additionally, server bugs might require that additional
errors cause an upload reset. To allow that, a new capability
is added that can be used to advise the client about this.
2017-01-13 14:44:45 +01:00
Olivier Goffart
0249a68420 SelectiveSync: adjust the position of the "Loading" label
It should be parented to the treeview to be sure that is shows inside of it.
2017-01-13 10:55:45 +01:00
Christian Kamm
aa6f041c36 wizardSelectiveSyncDefaultNothing applies to folder wizard #4581
Previous the Theme option only applied to the account setup wizard.
2017-01-13 10:52:39 +01:00
Christian Kamm
dce3f8c4f6 Selective sync: Adjust widget common to folder/account wizards 2017-01-13 10:52:10 +01:00
Christian Kamm
ffbf34cb97 Log the auth type being used for accounts
There have been hard to track down bugs related to the wrong auth
type being used.
2017-01-11 09:30:59 +01:00
Markus Goetz
76fde49282 sqlite: Update bundled version to 3.16.1
For OS X and Windows.
2017-01-05 17:27:46 +01:00
Christian Kamm
adbe5ecf55 ownsql: qFatal on prepare errors #5357 2017-01-04 15:15:06 +01:00
Christian Kamm
084146756b Account: Fix displayName() #5413
This displayName() seemed to be based on Account::user() which used
to call _credentials->user(). But then we repurposed user() to be
davUser() and this usage wasn't updated to point back to the username
used for the credentials.
2017-01-03 13:54:59 +01:00
ckamm
e1f5a49c21 Don't blacklist 507 Insufficent Storage #5346 (#5424) 2017-01-03 13:48:32 +01:00
Christian Kamm
e286bb1b64 Wizard: Don't accidentally pre-fill url field #5412
slotUrlEditFinished() is called when the wizard is triggered in
some situations.
2017-01-03 11:53:40 +01:00
Olivier Goffart
d433f0e08e HTTPCreds: remove all cookies when logging out (#5383)
Some custom server use persistent cookies with the auth token. So we should
clear all the cookies when disconnecting.
Account::clearCookieJar is only called from the HTTPCredentials. This funciton
is not used for shibboleth.
There is probably no reasons to keep the HTTP cookie anyway.

Issue #5370
2017-01-03 11:39:10 +01:00
Christian Kamm
fa9b36f829 Wizard: Let the user know if url is invalid #5398 2017-01-03 11:28:56 +01:00
Christian Kamm
6835429a28 Sql: Allow prepare fail for PRAGMA quick_check #5357
This actually happens in low-disk situations.
2017-01-03 10:43:29 +01:00
Christian Kamm
22135f9f57 Fixup broken authType on load #5408 2017-01-03 10:38:20 +01:00
Christian Kamm
473dcb0947 Only create a FolderWatcher if the path exists
Also retry creating it before each sync.

See #5317
2017-01-02 08:52:26 +01:00
Christian Kamm
e306f4611c Reschedule a folder regularly with some delay for some errors
Like "folder doesn't exist" - such that we will detect when the folder
becomes available and start syncing.

See #5317
2017-01-02 08:52:26 +01:00
Markus Goetz
c6f4f44619 Fix up SSL client certificates #5213 #69 (#5289)
The re-enables the UI, uses Qt API for importing and
stores the certificate/key in the system keychain.
People who had set up client certs need to re-setup the account. This is ok
since it was an undocumented feature anyway.
2017-01-02 08:34:02 +01:00
Christian Kamm
3b7887ca35 Wizard: Detach saved account from wizard
Fixes #5408 #5407.

The problem was that cleanup of the credentials page set the
credentials of the account back to dummy, thereby overriding
things like shib usernames.

This should be broken since a932eac832.
2016-12-21 15:31:12 +01:00
Piotr Mrówczyński
d781e63fab Add capability to disable parallel chunked upload #5364 - technical review (#5403) 2016-12-21 15:08:45 +01:00
Christian Kamm
030e3a5d4a Increase initial bandwidth estimates #4428 #5390
To 2 MB/s and 10 files/s.
2016-12-21 08:53:47 +01:00
Christian Kamm
3912dba33a Move qDeclareMetatype from Folder to SyncEngine 2016-12-20 11:43:39 +01:00
Christian Kamm
d8c479ab1e Don't wipe db if check fails while disk space is low #5357
An experimental fix for the issue, merged because it's low risk and
makes testing easier.
2016-12-20 09:33:59 +01:00
Olivier Goffart
775a1c9ad8 FolderStatusModel: Fix insert/remove items when there are labels
Otherwise it might happen that the model is inconsistant and this can
lead to crash in the worst case.

(For example, if there was a "fetching" label, and we hide it because it
was a 404. In this case, we would not call begin/endRemoveRows, so the
view could still call the model with an index of row 0, that used to be
for the label, but now correspond to the first element of _subs. And
because _subs is empty, this could lead to crashes)
2016-12-14 14:13:47 +01:00
Olivier Goffart
ac95844ebd Propagator: make sure every network job has a parent
This could make sure that the network job gets deleted if the parent job gets
deleted, and would avoid crashes like:

Crash: EXCEPTION_ACCESS_VIOLATION_READ at 0xffffffff8b008a04
  File "qiodevice.cpp", line 1617, in QIODevice::errorString
  File "propagatedownload.cpp", line 264, in OCC::GETFileJob::slotReadyRead
  File "moc_propagatedownload.cpp", line 85, in OCC::GETFileJob::qt_static_metacall
  File "qobject.cpp", line 3716, in QMetaObject::activate
  File "moc_qiodevice.cpp", line 154, in QIODevice::readyRead
  File "qnetworkreplyhttpimpl.cpp", line 1045, in QNetworkReplyHttpImplPrivate::replyDownloadData

(#5329)
2016-12-14 14:13:47 +01:00
Olivier Goffart
c5b90d9507 Account::slotHandleSslErrors: add guards in case the reply gets deleted in the dialog event loop
Since slotHandleSslErrors will show a dialog with an eventloop, it could be
That the reply gets deleted. Guard against that.

(#5329)
2016-12-14 14:13:47 +01:00
Christian Kamm
d631f2e070 Sync now: Disable on disconnect, rename while running #2158 2016-12-13 15:28:52 +01:00
Jocelyn Turcotte
f985111b62 Fix the log window not showing csync logs
The csync log level was only set up on startup, and for log files.
Fix the issue by making Logger::isNoop rely on being explicitly activated
for the log window instead of relying on the presence of a connected
signal, and move the csync log level logic in Logger.
2016-12-09 10:03:46 +01:00
Jocelyn Turcotte
e8d734b1c2 Fix the sync direction being wrong on MSVC
The compiler seems to use signed enums and we need to reserve an extra
bit for the sign to avoid the 2 value to overflow and being interpreted
as -2 when read, and thus not being correctly compared to the full enum
value.
2016-12-09 10:03:46 +01:00
ckamm
5bef1aa402 Merge pull request #5045 from owncloud/dbjournal_per_account
Allow a folder to be synced to several accounts. This changes the path of the sync journal file!
2016-12-06 10:55:58 +01:00
Olivier Goffart
4ac2b764a4 libsync: Clear the upload info after several retries (#5345)
Issue #5344
2016-12-05 17:21:36 +01:00
Olivier Goffart
19d2677db1 libsync: use the new webdav url if the server reports it
The rules to select the webdav url are now:

 - If the server reports that the new chunking algorithm is working,
   always use remote.php/dav/files/<username>
   This capability can be overriden with an environment variable

 - Otherwise, use the dav path provided by the theme, which defaults to
   remote.php/webdav

This means that with the newer server, the branding can no longer override
the webdav URL. If there is still an usecase for the branding to do so, we
need to find another way to override it. But it is now more complicated to
configure as might need include the username and need different endpoint
depending on the operations (chunks or not)

Issue #4007
2016-11-29 16:16:20 +01:00
Christian Kamm
a139d1a279 FolderWizard: pass AccountPtr by const&
For review of #5045
2016-11-29 10:39:20 +01:00
Christian Kamm
acb155503b Ensure the 'Sync paused' state is used after pausing #5290 2016-11-29 09:56:45 +01:00
Olivier Goffart
109056e676 owncloudcmd: Don't put the password in the URL
As the URL might be print on the logs.
Also don't change the scheme from http to owncloud.

This was required before when we were using neon through csync, but now that
we use QNAM for everything we don't need it. The credentials from the account
are used.
2016-11-26 12:57:44 +01:00
Christian Kamm
68f99bcc27 AccountSettings: Add a "Force sync now" context menu option 2016-11-25 14:23:56 +01:00
Christian Kamm
045498c71a Account: Rename user() to davUser()
Avoids potential confusion with credentials->user()
2016-11-23 17:08:17 +01:00
Christian Kamm
49f8143f00 Bugfixes for sync journal name generation and usage
* Use 'user' value for journal name generation
* Save journal name in settings
* Make owncloudcmd choose the right db
2016-11-23 16:48:15 +01:00
Christian Kamm
bea7241910 Don't wipe each journal on each start 2016-11-23 16:48:15 +01:00
Christian Kamm
61b4da944c Split folders configuration locations for backwards compatibility 2016-11-23 16:48:15 +01:00
Christian Kamm
6fe1868693 Always migrate .csync_journal to ._sync_xxx 2016-11-23 16:48:15 +01:00
Christian Kamm
9641c7a1e7 Rename sync journal to ._sync_xxx.db.
The added underscore means that older clients will also ignore the
file.
2016-11-23 16:48:15 +01:00
Christian Kamm
3e59a9b316 Merge branch 'master' into dbjournal_per_account 2016-11-23 16:47:56 +01:00
Markus Goetz
679ac0d26a Wizard: Show if server asks for client certificate #2799 #69 (#5261)
This also nicely displays the 'Untrusted domain' message of oC.
The link to add a trusted domain (via web browser) is clickable.
2016-11-23 11:43:15 +01:00
Markus Goetz
2e3a3bcf84 Folder: Make folder only accessible by user #5282 (#5315)
Because on OS X the parent folder might not protect
against access.
2016-11-23 11:05:41 +01:00
Olivier Goffart
d22d0e7e30 Propagator: don't use dynamic_cast for QObject
qobject_cast is better. (no need to use RTTI when we have QMetaObject
2016-11-22 17:37:41 +01:00
Samuel
4998303c42 Fixing a typo on a message
This refers to the message shown when copying the list of unsynced items on the activity tab
2016-11-22 12:14:03 +01:00
Christian Kamm
ceef2f2d46 FolderMan: Never schedule paused folders #5290
Previously the last folder in the queue was scheduled, regardless
of whether it was paused or not.
2016-11-22 10:53:15 +01:00
Olivier Goffart
a1dc4069c9 libsync: Don't store the remote URI in the csync or in the SyncEngine
We are going to change the webdav path depending on the capabilities.
But the SyncEngine and csync might have been created before the capabilities
are retrieved.

The main raison why we gave the path to the sync engine was to pass it to csync.
But the thing is that csync don't need anymore this url as everything is done by the
discovery classes in libsync that use the network jobs that use the account for the urls.
So csync do not need the remote URI.

shortenFilename in folderstatusmodel.cpp was useless because the string is the
_file of a SyncFileItem which is the relative file name, that name never
starts with owncloud://.

All the csync test creates the folder because csync use to check if the folder
exists. But we don't need to do that anymore
2016-11-21 08:09:11 +01:00
Christian Kamm
eb8de8e3c0 Enable clicking on 'not synced' items #5306 2016-11-18 16:19:36 +01:00
ckamm
ec7333a4bf Merge pull request #5272 from owncloud/licensefix-pending
License: Adjust license of GPLv2 source files to GPLv2+
2016-11-18 15:14:47 +01:00
Christian Kamm
e485c5c008 Always send a progress message at the end of a sync #5290
Some listeners detect whether a sync is finished by checking
for isUpdatingEstimates and completedFiles >= totalFiles. But
if a sync didn't transfer any files we never sent signal
with these values. Now we do.
2016-11-18 12:33:44 +01:00
Christian Kamm
6451eb3ade Tray: Add a 'New account...' action if no account is configured #5307
Useful when left-clicking the tray icon isn't working for some reason.
2016-11-18 12:17:05 +01:00
Olivier Goffart
efa7821dd2 Revert "Discovery: consider also the "shared by me" as shared"
This reverts pull request 5313 (commit
2d6e473a40 and
2f3db04e87)

The problem is that this loads the server too much.
2016-11-16 17:45:40 +01:00
Markus Goetz
89f55cf9df Folder: Add comments after discussion about pre-selected selective sync 2016-11-16 14:08:05 +01:00
Markus Goetz
52552a4204 Merge pull request #5102 from owncloud/chunking-ng
Chunking ng
2016-11-15 15:56:52 +01:00
Olivier Goffart
2f3db04e87 Rename SyncFileStatus::sharedWithMe to shared
Last commit for issue #4788 made the meaning to be simply shared
(with the user or from the user)
2016-11-15 14:32:20 +01:00
Olivier Goffart
2d6e473a40 Discovery: consider also the "shared by me" as shared
The "S" in the permission is only for the "Shared with me" files.
It is only used to show the shared status in the overlay icons.
But we also wish to show the shared status for files that are shared
"by" the users. We can find that out using the 'share-types' webdav
property. If set, then we are sharing the object.
We fake a 'S' in the permission as for our purpose, they mean the same.

Issue #4788
2016-11-15 14:32:20 +01:00
Olivier Goffart
2723cd225e FolderStatusDelegate: Fix compiler warning.
QStyleOptionProgressBarV2 is deprecated in Qt5.
2016-11-15 10:16:41 +01:00
Olivier Goffart
77e790d2ee Merge pull request #5304 from owncloud/Kawohl-linktocentral
documnetation.
2016-11-14 12:43:10 +01:00
Tobias Haeussler
0c0a3ca0a5 Add manifest file on Windows to make the application UAC aware. 2016-11-14 12:16:58 +01:00
Olivier Goffart
5377d1e283 Chunking-NG: code cleanup after review 2016-11-14 10:42:07 +01:00
Jonathan Kawohl
29d3c33eb2 added missing quotes 2016-11-09 08:59:14 +01:00
Jonathan Kawohl
469eca1f5f added link to central 2016-11-09 08:59:14 +01:00
Jonathan Kawohl
0864d67a9a fixing wrong files Revert "fix for https://github.com/owncloud/client/issues/1251"
This reverts commit 4f1feab845.
2016-11-09 08:59:14 +01:00
Jonathan Kawohl
e9503664f5 fix for https://github.com/owncloud/client/issues/1251 2016-11-09 08:59:14 +01:00
ckamm
36d61ef3a9 Doc: Add sync algorithm overview and comments (#5277)
* Doc: Add sync algorithm overview and comments
2016-11-08 16:10:55 +01:00
Christian Kamm
f1f27221a7 Conflicts: Use the local mtime for the conflict file name #5273
Otherwise local conflict files may be overridden in a restore
situation. See ticket for details.
2016-11-08 14:47:51 +01:00
Christian Kamm
eb012d26ee FolderStatusModel: Minor cleanups. 2016-11-08 14:01:07 +01:00
Christian Kamm
9ee8187083 Sort folder list alphabetically #5299 2016-11-08 14:01:07 +01:00
Christian Kamm
90cea69692 Network: Add "Accept" header for some firewalls #5298 2016-11-08 11:01:49 +01:00
Christian Kamm
0e2782d369 Terminate sync when pausing from context menu #5290 2016-11-07 12:50:06 +01:00
Olivier Goffart
15f2b911d9 ChunkingNG: remove stale files when resuming 2016-11-04 16:43:01 +01:00
Olivier Goffart
e3a4c3989a SyncEngine: disable heuristics for backup restoration for server >= 9.1
The ownCloud 9.1 server has a data-fingerprint property that the admin must
change in case of backup restoration. When this change, the client understands
that a backup was restored, and will generate conflict files and re-upload
new files.

The heuristics based system checks that there is at least two files wose mtime
is put back in the past and no files that goes forward. In that case we ask the
user before creating the conflicts.

This commit disable the heuristics for newer server that have the data-fingerpint.
And change the heuristics to two hours because we want to avoid false positive due
to some clock error, and that 2 hours of lost due to backup restoration is probably
not so bad.

We only ask the user in the heuristics based aproach so in practice this mean that
the "backup-detected" dialog will no longer appear with newer server.

Relates issues #5260, #5109
2016-11-04 16:30:58 +01:00
Piotr Mrówczyński
a2287c9657 Merge pull request #5274 from owncloud/reduce_loops_dirjob
Cache the value of last unfinished job in the PropagateDerectory scheduleNextJob
2016-10-31 22:07:50 +01:00
Piotr M
34c59ba9ed reduce number of loops 2016-10-31 19:45:24 +01:00
Olivier Goffart
c8014a0afd ChunkingNG: Add Test 2016-10-31 15:16:53 +01:00
Olivier Goffart
456d82715e Fix compile after merge 2016-10-31 11:29:33 +01:00
Olivier Goffart
8ca3eb7883 Merge remote-tracking branch 'origin/master' into chunking-ng 2016-10-31 11:09:12 +01:00
Christian Kamm
5f47c01346 Account: Rearrange for readability 2016-10-25 13:20:23 +02:00
Christian Kamm
10644d3568 Move concatUrl and settingsWithGroup to Utility
There was little reason to keep them cluttering Account.
2016-10-25 12:05:28 +02:00
Christian Kamm
9ee3144358 Account: Remove wasMigrated/setMigrated
It was unused since early in the multi-account work:
a932eac832
2016-10-25 11:43:06 +02:00
Christian Kamm
cf48ea2e00 Remove unused functions
Account::changed and AbstractCredentials::changed have not been needed
in a long while.
2016-10-25 11:33:38 +02:00
Christian Kamm
db24f60ae3 License: Adjust license of GPLv2 source files to GPLv2+
See #5180
2016-10-25 11:06:54 +02:00
Christian Kamm
6026148692 FolderMan: Clean up API
Many public slots didn't need to be public or slots.
2016-10-25 09:44:34 +02:00
Christian Kamm
a2222228c9 FolderMan: Document and clean up folder scheduling 2016-10-25 09:44:34 +02:00
Olivier Goffart
e33b89c222 Chunking-NG: Enable if the server supports it 2016-10-21 16:42:27 +02:00
Olivier Goffart
273590fdfc ChunkingNG: Use the 'If' header
As discussed in https://github.com/owncloud/core/pull/26368
2016-10-20 11:16:06 +02:00
Olivier Goffart
0960058842 Merge remote-tracking branch 'origin/master' into chunking-ng 2016-10-20 09:25:03 +02:00
Christian Kamm
69a1e46d0c Progress: Reset lastCompletedItem #5256
Otherwise progress listeners think it's still the last-completed
item when the next sync starts. This lead to spurious entries in
the "Recent Changes" list.
2016-10-18 12:29:52 +02:00
Christian Kamm
e020a5327e Force a remote discovery when upgrading to this version #5242
A remote discovery will fix up any lingering problems caused by #5190.
2016-10-18 11:21:01 +02:00
Christian Kamm
1b04489887 Remove stale commented code
These functions don't even exist anymore.
2016-10-18 11:21:01 +02:00
Olivier Goffart
36a19703db SyncEngine: Permission error in subfolder of a folder that cannnot be added is a SoftError
Issue #5059
2016-10-17 12:22:04 +02:00
Markus Goetz
d600fdc89b OS X: Use monochrome tray icon by default (#5229) 2016-10-14 14:26:31 +02:00
Markus Goetz
8c5ea8dc90 Propagator: Also upload more in parallel (#5230)
Fix for https://github.com/owncloud/client/issues/4986#issuecomment-227071801

This is before we have bundling at some point.
2016-10-14 14:23:55 +02:00
Olivier Goffart
766d9ae1ac QProgressIndicator: update copy from upstream
Update from commit 05ce8a23cdc12e825532dc6de06c267fb8d48b4f from
https://github.com/dragotin/QProgressIndicator
Which itself is forked from commit e5ba0fd09bfd43b067ee3646d70b294c7efcb558 from
upstream, with additional license header.

It was relicensed to MIT according to
14bb9d10e2

Relates to issues #5180 and #5184
2016-10-13 12:05:59 +02:00
Markus Goetz
5000d40619 Fixup previous commit
Thanks @ogoffart for spotting.
2016-10-12 19:10:56 +02:00
Klaas Freitag
16e28567a6 Folderman: Some comments for the checkPathValidityForNewFolder method. 2016-10-12 18:16:53 +02:00
Klaas Freitag
3bef42db6b folderman: checkPathValidityForNewFolder - correct file path comparison
It now checks based on the correct case sensitivity and also using the new
method for filename comparison.
2016-10-12 14:50:10 +02:00
Klaas Freitag
27d23edacc Utility: Add a function to check if two filenames are equal plus test.
It calls canonical path always and works with the correct case preserving
depending on the platform.
2016-10-12 14:48:00 +02:00
Markus Goetz
fc7aaf792b Auto Start: Only set on first account setup, not all later ones 2016-10-11 20:28:14 +02:00
Markus Goetz
f6355e15a3 sqlite: Update bundled version to 3.14.2
For OS X and Windows.
2016-10-11 20:06:43 +02:00
Olivier Goffart
d80d5a8ee4 SyncEngine: Fix renaming a folder should keep the selective sync state
Issue #5224

Two problems:

 - In the discovery phase, we need to check the selective sync entries of
   the source path in case of renames.

 - When the rename is done, we need to actually update the black list in the
   database.
2016-10-11 14:38:25 +02:00
Olivier Goffart
9d3e78ed54 AccountManager: do not load invalid account
Some tests (such as FolderManTest) can polute the config file with invalid
accounts.

(That's because most of the code, (even in libsync) always instentiate a ConfigFile)
2016-10-11 14:27:14 +02:00
Olivier Goffart
b6079bfe4f Remove usused variable 2016-10-11 12:12:28 +02:00
Olivier Goffart
f75106fd8e SyncJournalDB: check the return value of the prepare statements in checkConnect
Relates to #5199
2016-10-11 11:35:26 +02:00
Olivier Goffart
57fe7b800f Theme: Fix compiler warning
Relates #5227
2016-10-11 10:31:47 +02:00
Klaas Freitag
e1a48e3c33 Move the journal file name generation to the syncjournaldb class.
As requested by Olivier.
2016-10-10 16:59:17 +02:00
Olivier Goffart
c2fa9b5bbf AccoutWizard: Change the set policy of a radio button
In an attempt to make sure the button next to it don't get too small.

Issue #5209
2016-10-10 13:27:28 +02:00
Olivier Goffart
86522cbbf0 OwnSQL: avoid crashing in SqlQuery::reset_and_clear_bindings
The crash reporter shows a lot of crashes in sqlite3_clear_bindings
which seems to indicate that _stmt is null. We should guard against
a null value in order to avoid crashing.

This should only happen if the prepare call fails. We don't usually
check the return value of the prepare call, but if _stmt is null, the
exec call should return false, not true. We check the result of the
exec call, so this should then abort the sync with an error, rather
than crashing.
2016-10-10 13:27:12 +02:00
Klaas Freitag
c84140d293 checkPathValidityForNewFolder: Catch sync folders underneath sym links.
plus some whitespace changes.
2016-10-07 16:23:13 +02:00
Christian Kamm
91b6b88883 Tray: Fix crash on startup for non-OSX oses 2016-10-07 13:32:42 +02:00
Tommy Sparber
67ecca492b Improve macOS SysTray/StatusBar monochrome icon (#5227)
- Use a white icon if the context menu is visible.
- Enable `QIcon::setIsMask` if compiled on Qt >= 5.6 to allow automatic
  macOS color handling.
- No changes if the colored icons are used.
2016-10-06 17:18:51 +02:00
Markus Goetz
84c925dc58 503: Also parse other server error message (#5228)
From https://github.com/owncloud/core/pull/26145
2016-10-06 14:45:04 +02:00
Klaas Freitag
838c072ccc Folder Setup: Allow to set up more sync connects to the same folder.
One local folder can now be configured as sync target for multiple
accounts as long as their url and user differ.

Also this patch accepts that the sync folder is behind a symlink.
Also this patch fixes a bug that before the user input was taken
canonically which was not working for the symlink handling.
2016-09-30 14:08:00 +02:00
Klaas Freitag
ed6a708460 SyncJournalDb: Migrate the old csync journal to the new name.
Migration strategy to the new filename.
2016-09-29 16:41:11 +02:00
Christian Kamm
bd2bcad3ba ShareDialog: Remove context help button
Ticket #5203
2016-09-28 13:00:52 +02:00
Christian Kamm
598a7cec5d Merge remote-tracking branch 'origin/2.2' 2016-09-28 12:07:45 +02:00
Markus Goetz
95c479aa07 Wizard: Do the system proxy lookup in a thread (#5160)
This is analogous to the code in ConnectionValidator.
2016-09-26 15:45:30 +02:00
ckamm
035442b6da Improve the "new big folder" UI #5202 (#5204)
Instead of using the regular selective-sync UI (where it's unclear what
the "Cancel" button would even mean in this context), provide a
different set of buttons that allow the user to quickly synchronize
all pending big folders, none of them, or perform manual changes
as usual.
2016-09-23 13:47:57 +02:00
ckamm
98efb07535 Tray: Workaround collection (#5179)
Tray: Workaround collection

* QDBus workaround for Qt 5.5.0 only, there were reports of the tray
  working fine with 5.5.1. #5164
* OWNCLOUD_FORCE_QDBUS_TRAY_WORKAROUND to force the workaround on an off
* OWNCLOUD_TRAY_UPDATE_WHILE_VISIBLE to enable or disable updating of
  the menu while it's visible - disable by default due to problems on OSX and Xubuntu.
* Track the visibility of the tray menu with aboutToShow/aboutToHide
  only on OSX - the aboutToHide signal doesn't trigger reliably on linux
* Refactor such that setupContextMenu is different from updateContextMenu
* Don't use on-demand updating of the tray menu when the qdbus workaround
  is active, instead to occasional (30s) updates of the tray menu.
2016-09-23 10:44:54 +02:00
Olivier Goffart
bc04f79959 Missing Inc -> GmbH (#5181) 2016-09-22 15:32:12 +02:00
Christian Kamm
e10c97573f Warning if mailto url fails #5142 2016-09-22 14:16:58 +02:00
Olivier Goffart
fca5f1b210 owncloudcmd: fix --silent
We ignored csync log, but we also need to silent Qt debug output.
We need to ignore it at the very begining because there might be
qDebug also in account creation.

Issue #5196
2016-09-22 10:32:27 +02:00
Christian Kamm
0cea3d85f5 Add log messages for LockWatcher use #5190 2016-09-22 09:57:42 +02:00
Olivier Goffart
85b8ab178e SyncEngine: Fix renaming of folder when file are changed (#5195)
Two bugs:
 - The change filed are not considered as move, they are re-downloaded
   but the old file was not removed from the database. The change in
   owncloudpropagator.cpp takes care of removing the old entries.

 - Next sync would then remove the file in the server in the old folder
   This was not a problem until we start reusing the sync engine, and
   that the _renamedFolders map is not cleared. We were before deleting
   a non-existing file. But now we delete the actual file.

Also improve the tests to be able to do move on the server.
This include support for file id.

Issue #5192
2016-09-22 09:02:47 +02:00
Piotr Mrówczyński
b7eb37dc03 Merge pull request #5170 from owncloud/add_capabilities_owncloudcmd
add server capabilities to owncloudcmd
2016-09-21 22:28:41 +02:00
Olivier Goffart
98bfa8d5de Propagator: properly send the success flag (#5189)
In case of the root directory, it may happen that the _item
is empty and the _item->_status is NoStatus.  But we still need to report
the proper success or error of the whole propagation. We should really
use _hasError for that. However, _hasError is also defined to NoStatus
if there was no error, so in that case we need to set Success.

This fixes the problem in which the data-fingerprint is not saved on the
database because the SyncEngine think that the sync failed. (Issue #5185)
2016-09-21 16:35:42 +02:00
Olivier Goffart
ff701bd473 ConnectionValidator: properly handle error in status.php (#5188)
We wwer enot connecting to the right signal from the check server
job, and therefore we were not catching the condition in which the
json was invalid. We would then never terminate the ConnectionValidator job.

Note that instanceNotFound is also emited if there is a network error.

The log looked like this:

10:25:51.247 OCC::CheckServerJob::finished: status.php from server is not valid JSON!
10:25:51.248 OCC::CheckServerJob::finished: status.php returns:  QMap()   QNetworkReply::NetworkError(NoError)  Reply:  QNetworkReplyHttpImpl(0x2b6a790)
10:25:51.248 OCC::CheckServerJob::finished: No proper answer on  QUrl("http://localhost/~owncloud/status.php")
10:26:23.235 OCC::AccountState::checkConnectivity: ConnectionValidator already running, ignoring "owncloud@localhost"
10:26:55.235 OCC::AccountState::checkConnectivity: ConnectionValidator already running, ignoring "owncloud@localhost"
[...]
2016-09-20 11:55:43 +02:00
Jocelyn Turcotte
31aaf956f5 Merge pull request #5182 from jturcotte/msvcBuild
Fix the MSVC build
2016-09-20 10:39:14 +02:00
Jocelyn Turcotte
2b274e9460 Fix the MSVC build
- Replace functions that are provided by MinGW with a Win32-based
  implementation
- Explicitly export needed symbols from ocsync.dll
- Rename share.h to sharemanager.h since the name clashes with one
  of the Windows headers and get included from there
- Remove the timestamp from the fallback csync stderr logging, it's
  not used since we always provide a log callback
2016-09-16 17:43:39 +02:00