Commit graph

1213 commits

Author SHA1 Message Date
Jocelyn Turcotte
e974771796 csync: Use an explicit instruction for should_update_metadata
The current way of tracking the need to update the metadata without
propagation using a separate flag makes it difficult to track
priorities between the local and remote tree. The logic is also
difficult to logically cover since the possibilities matrix isn't
100% covered, leaving the flag only used in a few situations
(mostly involving folders, but not only).

The reason we need to change this is to be able to track the sync
state of files for overlay icons. The instruction alone can't be
used since CSYNC_INSTRUCTION_SYNC is used for folders even though
they won't be propagated. Removing this logic is however not possible
without using something else than CSYNC_INSTRUCTION_NONE since too
many codepath interpret (rightfully) this as meaning "nothing to do".

This patch adds a new CSYNC_INSTRUCTION_UPDATE_METADATA instruction
to let the update and reconcile steps tell the SyncEngine to update
the metadata of a file without any propagation. Other flags are left
to be interpretted by the implementation as implicitly needing
metadata update or not, as this was already the case for most file
propagation jobs. For example, CSYNC_INSTRUCTION_NEW for directories
now also implicitly update the metadata.

Since it's not impossible for folders to emit CSYNC_INSTRUCTION_SYNC
or CSYNC_INSTRUCTION_CONFLICT, the corresponding code paths in the
sync engine have been removed.

Since the reconcile step can now know if the local tree needs metadata
update while the remote side might want propagation, the
localMetadataUpdate logic in SyncEngine::treewalkFile now simply use
a CSYNC_INSTRUCTION_UPDATE_METADATA for the local side, which is now
implemented as a different database query.
2016-08-17 15:39:31 +02:00
Klaas Freitag
5ac434a740 Logs: Add the name of the platform we're running on to the log. (#5082) 2016-07-28 16:30:40 +02:00
Christian Kamm
39bde6f3e4 Revert "Add 'open in browser' to account menu #4824"
This reverts commit 3c575a2f37.

One can already open the account in the browser by clicking the
link in the settings dialog!
2016-07-19 11:19:40 +02:00
Olivier Goffart
7c671756e6 Merge remote-tracking branch 'origin/2.2'
Conflicts:
	src/libsync/syncfilestatustracker.cpp
2016-07-12 17:38:15 +02:00
Olivier Goffart
f3f387c36b Merge pull request #5016 from owncloud/overrideurl
AccountManager: Don't force the server URL while loading the config.
2016-07-12 14:33:28 +02:00
Olivier Goffart
b53ce78eb6 Merge pull request #5025 from ArthurChiao/bugfix_#5015
fix #5015 overlay icon not show: compare folder paths with no case-se…
2016-07-12 14:32:54 +02:00
ckamm
bc4753e938 Sharing: Fix bug with file names containing percent encodes #5042 (#5043) 2016-07-12 14:25:33 +02:00
arthurchiao
3335c733d7 be case insensitive for MacOSX, too 2016-07-08 15:53:11 +08:00
arthurchiao
4da55b69df ignore case-sensitivity only on windows 2016-07-08 15:12:37 +08:00
Christian Kamm
3c575a2f37 Add 'open in browser' to account menu #4824 2016-07-05 14:48:51 +02:00
arthurchiao
7a2a439426 fix #5015 overlay icon not show: compare folder paths with no case-sensitivity 2016-07-01 13:03:42 +08:00
Olivier Goffart
dff57362f9 AccountManager: Don't force the server URL while loading the config.
While loading the account, only override the server url if Theme::forceConfigAuthType
is set. This restore the behavior from the client 2.1 for theme that did not
use Theme::forceConfigAuthType.

Issue: owncloud/enterprise#1418
2016-06-28 14:32:03 +02:00
Olivier Goffart
3f3a679f81 Fix the URL from previous commit
The pull request was merged too early and did not contain the URL change

(Issue #4877)
2016-06-28 14:17:16 +02:00
Olivier Goffart
cde9017340 GUI: Show link to the page that allow to add a new token (#4963)
If owncloud >= 9.1 is detected:
and add a link to the ownCloud page that allow to add device token.

Issue #4877
2016-06-28 12:25:04 +02:00
Jocelyn Turcotte
446e7cbd93 Fix a QAction leak (#5008)
Attach the accout menu QAction to the menu rather than the
ownCloudGui since it should be destroyed when the context
menu is cleared.
2016-06-27 16:22:51 +02:00
ckamm
b4d26ba952 Fix windows HiDPI #4994 (#4998)
This was removed in 0194ebb222
because it breaks on Linux. However, it looks like it is correct
for Windows. In the meantime the surrounding ifdef has changed
from !Q_OS_MAC to Q_OS_WIN, so reverting it makes sense.
2016-06-27 16:17:58 +02:00
ckamm
86fd982b00 SocketAPI: Use different pipe name #4977 (#4997)
Named pipe names that contain backslashes sometimes lead to problems.
2016-06-27 15:13:08 +02:00
ckamm
bdb304f8ec Share: Permissions for federated shares on servers >=9.1 #4996 (#5001)
This disables the workaround 487e1fdca5ee04fc98c1ed77898df70d740967c8
for servers that are new enough to support fine grained permissions
on federated shares.

The consequence is that the 'reshare' permission is now granted by
default and that users can edit permissions on the usual fine-grained
level again.

The way the client deals with servers <9.1 is unchanged.
2016-06-27 11:09:51 +02:00
Christian Kamm
440a804836 Tray: Add minimal mode as workaround and testing tool #4985 #4990 2016-06-23 10:22:43 +02:00
Christian Kamm
6e9df8673f Merge remote-tracking branch 'origin/2.2' 2016-06-22 15:41:37 +02:00
Markus Goetz
ab24980001 Merge pull request #4979 from jturcotte/2.2
Memory improvements during propagation
2016-06-21 10:00:41 +02:00
ckamm
07dea72c37 Setup csync logging earlier (#4991)
We were missing some csync related log output during startup.

Discovered in #4967
2016-06-21 09:58:53 +02:00
ckamm
43a2aec92b Performance: Don't redundantly add the same exclude files #4967 (#4988)
Excludes: Don't redundantly add the same exclude files #4967, Never accept duplicate exclude patterns #4967
2016-06-20 15:14:13 +02:00
ckamm
681243277e Share dialog: Add 'Mail link' button #3261 (#4961) 2016-06-20 13:06:57 +02:00
Jocelyn Turcotte
87e3553c85 Prevent the sync protocol widget from over-using memory
During propagation, we create a line for each file, taking memory, but
we delete all lines passed 2000 right at the beginning of the next sync.
Since the user has little chances of being able to read past those 2000
lines in the log, we might as well keep it capped at 2000 also during
propagation to prevent it from eating memory.
2016-06-17 19:20:53 +02:00
Jocelyn Turcotte
6f3aaecb78 Fix a crash on if shutting down during propagation
The SyncRunFileLog owned by the Folder must be destroyed after the
SyncEngine since the SyncEngine will abort during destruction, resulting
in all jobs being aborted.

It's possible that this crash only happens with a debug build.
2016-06-17 19:20:52 +02:00
Jocelyn Turcotte
cb50fae0a7 SocketAPI: Move the normalization closer to the data entrance (#4972)
Follow-up for #4884
2016-06-15 21:03:21 +02:00
Christian Kamm
d655074f85 Log: Include start of propagation and lap duration 2016-06-09 14:28:15 +02:00
Christian Kamm
85a173e174 Log: Write the sync log during propagation #3108
...instead of when done with the sync. This way we get information
even if the client crashes.
2016-06-09 14:10:47 +02:00
Jürgen Weigert
ebc44fa494 Update accountsettings.cpp 2016-06-07 14:21:50 +02:00
ckamm
355a8a0a27 Workaround for Ubuntu 16.04 tray issue #4944 (#4947) 2016-06-07 11:48:25 +02:00
Christian Kamm
48efbcb8ca Merge remote-tracking branch 'origin/2.2' 2016-06-07 09:39:44 +02:00
Olivier Goffart
b99c8fe28b Folder: fix removing folder with escaped characters (#4943)
FolderDefinition::save and load escapes the alias. We also need to escape
it when we remove it.
New folder can't be created with alias that needs escaping, but old folder
from old config may still exist, and we must allow user to delete them.
2016-06-03 13:10:01 +02:00
Olivier Goffart
5a3120bd52 Folder: Ignore change from the watcher if the file has not changed its mtime or size (#4942)
For issue #4927:
On Windows 10, we get a notification after the sync is finished for file that were
just downloaded. The guard we have against our "own changes" are only working when
the sync is running and the OwncloudPropagator still alive.
2016-06-03 13:06:11 +02:00
Markus Goetz
51f8a59a9a OS X: White-list the folder watcher enums
I got syncs triggered for even opening a file by double clicking it in Finder
and having launched Preview.app (e.g. for JPEG files).
2016-06-02 18:20:07 +02:00
Olivier Goffart
6ccd9e872d GUI: don't force the environment variable for high DPI on linux.
Setting the Environment variable only for owncloud makes in inconsistant with
other Qt application running at the same time.

The users can still set it themself for the whole desktop if they wish.

Addresses #4840
2016-06-02 17:57:10 +02:00
Daniel Molkentin
1787da8a9d Fix memleak in updater 2016-06-02 15:03:52 +02:00
Markus Goetz
de82d8fcdb QNAM: Try to workaround missing Qt patches #4720 #3888 #4051
We try this on all platforms now so we have more consistent behaviour.
2016-05-31 10:26:52 +02:00
Stephen Colebrook
af2b712dc6 Search results are filtered by server. Don't filter a second time.
Also allows searching on attributes other than displayname in ldap
configurations. Search results match web and mobile apps.
2016-05-31 09:46:52 +02:00
Stephen Colebrook
d4b72132d6 Search results are filtered by server. Don't filter a second time. Also allows searching on attributes other than displayname in ldap configurations. Search results match web and mobile apps. (#4902) 2016-05-31 09:45:38 +02:00
Markus Goetz
a507558dee Connectivity: Reduce ETag job timeout to 60 sec #4275
Before it used the default job timeout
2016-05-31 09:35:47 +02:00
Markus Goetz
d88ab4653b Connectivity: Delete job on timeout #4275
This was not done if there was no reply
2016-05-30 18:15:41 +02:00
Daniel Molkentin
0194ebb222 Don't try to determine pixel ratio with Qt < 5.6.0
This seems to be broken. Worst case users can still
set it manually

Addresses #4840
2016-05-30 08:27:57 +02:00
Matthew Leeds
7f0cc5b699 Fix typo in folder.cpp 2016-05-27 11:13:18 -04:00
ckamm
0e2c16e827 Certs: Re-ask for different cert after rejection #4898 (#4911)
Previously rejecting any kind of certificate meant that the user
was never asked again, even if the certificate changed.

Now we keep track of which certificates were rejected and ask again
if the ones mentioned in the ssl errors change.

mitmproxy is excellent for testing this.
2016-05-27 12:08:42 +02:00
Olivier Goffart
159535fe90 Merge branch '2.2' 2016-05-25 16:30:17 +02:00
ckamm
c6794cd338 Progress info: Reset between syncs #4856 (PR #4872) 2016-05-20 15:07:54 +02:00
ckamm
567fe87e98 Use natural sorting for filenames if available #4859 (#4864) 2016-05-19 15:36:46 +02:00
Christian Kamm
a1ba23eea9 Activity: When a new notification arrives, switch to that tab #4805 2016-05-19 14:13:07 +02:00
Olivier Goffart
010649f997 FolderWizard: remove dead code and fix the alias
Remove a bunch of dead code.

And also set the root folder name properly since alias is gone.

Fix the warning:
QWizard::field: No such field 'alias'
2016-05-18 10:52:22 +02:00