Commit graph

66 commits

Author SHA1 Message Date
Jocelyn Turcotte
cc9680c1e8 Also pass csync logs through QMessageLogger
This allows using logging rules and custom message patterns with csync.
This also pass the a relative verbosity to the message logger.

Issue #5647
2017-05-11 17:22:59 +02:00
Jocelyn Turcotte
b7553d5bdf Upgrade some qCDebug to qCInfo or qCWarning
Use qCInfo for anything that has general value for support and
development. Use qCWarning for any recoverable error and qCCritical
for anything that could result in data loss or would identify a serious
issue with the code.

Issue #5647
2017-05-11 17:22:59 +02:00
Jocelyn Turcotte
4ad190a558 Use Qt logging categories for logging
This gives more insight about the logs and allow setting fine-tuned
logging rules. The categories are set to only output Info by default
so this allows us to provide more concise logging while keeping the
ability to extract more information for a specific category when
developping or debugging customer issues.

Issue #5647
2017-05-11 17:22:59 +02:00
ckamm
7879c470b3 Merge pull request #5518 from ckamm/asserts
Improve usage of asserts
2017-02-08 15:25:02 +01:00
Christian Kamm
4c1fdf1dee Double check usage of asserts #5429
A few are supposed to be fatal.
2017-02-08 15:15:19 +01:00
Markus Goetz
6a4ae63f14 CentOS: Another fix for old compiler version (2) 2017-02-07 19:22:04 +01:00
Markus Goetz
19dd656989 CentOS: Another fix for old compiler version 2017-02-07 18:32:34 +01:00
Olivier Goffart
38cf459b3e Confirm External Storage: adjust the notification message
We need to forward the information that the folder is an external storage
for the notification message.

Issue: https://github.com/owncloud/client/pull/5340#issuecomment-274878023
2017-01-27 15:59:59 +01:00
Olivier Goffart
f89bc09fd1 Discovery: Filter 'M' out of permissions for non root storage
The sync engine rely on the 'M' in premission to ask for confirmation
(As requested in issue #5340)
But we only want to ask the premission for the 'root' of the mounting point and not
for every subfolders within it.
So we change the discovery phase in a way that it does not keep the 'M' for
children within the external storage.
2017-01-27 15:59:59 +01:00
Olivier Goffart
f854c5263b Wizard: Add options to ask confirmation for external storage
Added two checkboxes in the Account Wizard in the advanced page to change the first options.
Also added a checkbox in the general settings to ask for confirmation for external storages.

Theme options allow to hide the checkboxes in the wizard.

As described in issue #5340
2017-01-27 15:59:59 +01:00
Olivier Goffart
70da607e06 Discovery: Add branding option to disable default sync of 'M' directories
Issue #5331 and https://github.com/owncloud/enterprise/issues/1594
2017-01-27 15:59:59 +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
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
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
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
Markus Goetz
6ecda6e7f4 Merge branch '2.2' 2016-08-24 11:39:12 +02:00
Jocelyn Turcotte
b307f2b65c Revert "Fix a deadlock when shutting down during discovery" (#5100)
Reverts commit 622017adcf

Could be the cause of #5092 and the cost is higher than the benefit if this is the case.
A network request taking more than 30 seconds isn't something unlikely in this world
and shouldn't be a good reason to abort. We should try to untangle the threads
dependencies to properly fix this if possible instead.
2016-08-03 16:35:24 +02:00
Olivier Goffart
88e5a9411a SyncEngine: Reads the data-fingerprint property (#5056)
When it changes, assume a backup was recovered, and keep conflict files.

Issues: #2325 and https://github.com/owncloud/enterprise/issues/966
2016-08-02 10:30:49 +02:00
Jocelyn Turcotte
622017adcf Fix a deadlock when shutting down during discovery (#4993)
Since the SyncEngine now quits and waits for the discovery thread,
the main thread can enter a deadlock where the discovery thread waits
for its directory result.

Add a 2 seconds timer to the discovery thread wait condition
to limit the deadlock time.
2016-06-27 16:12:39 +02:00
Markus Goetz
a17f37d8ae Discovery: Be more explicit about files with unknown size #4573
Also related https://github.com/owncloud/core/issues/23468
2016-04-19 15:31:16 +02:00
Olivier Goffart
dd89ab59e4 Use oc:size instead of quota-used-bytes to get the sizes of folder (#4459) 2016-02-11 15:09:47 +01:00
Olivier Goffart
6b643c7501 Discovery: don't ignore recall file #4420
The ".sys.admin#recall#" is the recall file and should not be ignored
even if hidden.

The remote discovery do not need to detect hidden files because it
is already detected by csync in all cases. So this avoid code duplication
2016-02-08 12:07:34 +01:00
Klaas Freitag
62d26814b2 SyncEngine: Handle 403 Forbidden properly.
A 403 is a reply code sent from the file firewall to indicate that
this directory is forbidden to use for the user.

The patch handles it by setting the state to IGNORED.

This addresses #3490
2015-11-18 15:31:55 +01:00
Olivier Goffart
aa27b5db14 Discovery: silent static analysis warning
We do a check one line earlier that the size is smaller than the buffer
Then we don't need to call strncpy,  strcpy is enough
2015-11-09 17:22:17 +01:00
Olivier Goffart
0e6a463564 Discovery: Don't leak DiscoveryDirectoryResult in case of error
Also remove redundent Q_FUNC_INFO
2015-10-30 12:43:33 +01:00
Olivier Goffart
38a8e5ee03 Discovery: conding style: use const references for function parameters 2015-10-29 16:47:36 +01:00
Olivier Goffart
6d28a1b645 Fix Qt4 compilation 2015-10-28 13:26:35 +01:00
Klaas Freitag
0c9568f6dc Merge pull request #4004 from owncloud/fix_hidden_detection
Fix hidden detection
2015-10-28 09:28:35 +01:00
Klaas Freitag
6b71273380 Discovery: Fix detection of hidden files.
In the discovery phase we want to detect that dot-files are hidden
on Linux and Mac.

This fixes strange behaviour seen in issue #3980
2015-10-26 14:24:05 +01:00
Markus Goetz
ccec186b98 ETagJob: Depth 0 for server >= 8.1 #3730 2015-10-19 15:31:27 +02:00
Klaas Freitag
16d6418d10 Use a themable WebDAV path all over.
This is needed for enterprise#481
2015-09-10 13:04:26 +02:00
Daniel Molkentin
66f340734c Consistency: Use folder instead of directory in user visible strings 2015-09-07 08:51:40 +02:00
Olivier Goffart
952c249039 Selective sync: on the first sync, do not ask confirmation for every folders
Since we already confirmed a previous selective sync dialog
2015-08-05 16:11:59 +02:00
Phil Davis
8216727553 Notify of big folders that are greater than or equal to the limit
This should allow for the case when a user has set the limit to 0 and a new empty folder appears on the server. The folder will have size 0 (no files in it). Doing the >= test here will mean that the user will be prompted about the new folder, which I think is the behaviour they would expect.
The side-effect of this change is that if the user has a limit of, for example, 10,000,000 and a new folder comes along with exactly 10,000,000 of content then they will now be prompted about it. Before the change such a new folder would have been auto-synced without prompting the user. I do not think this is a big deal - I cannot believe that users will be counting exact bytes for this limit, they are just setting a rough number of MB at the UI.
Should fix https://github.com/owncloud/client/issues/3542
2015-08-04 19:28:23 +05:45
Olivier Goffart
0ccaae9a22 Confirm feature: Confirm for any folder, not only shared ones
issue #3148
2015-07-27 09:54:20 +02:00
Klaas Freitag
da87a47eaf discovery: handle dot files on server as hidden. 2015-07-15 15:20:46 +02:00
Olivier Goffart
cc3543dbd2 Confirm feature: The UI part in the selective sync view
Folder that are over the threshold will appear in red in the
selective sync view and will be deselected by default
2015-06-11 15:46:01 +02:00
Olivier Goffart
16786eed54 Merge pull request #3281 from owncloud/confirm
Confirm feature (sync engine part only)
2015-06-10 13:39:52 +02:00
Olivier Goffart
6df7551bdd DiscoveryPhase: Fix the unlikely case the server resturns utf-8 in permissions
UTF-8 size might be bigger than the size of the QString
In that case we would end up with a non-nill terminated permissions.
2015-06-08 15:40:06 +02:00
Olivier Goffart
02ffbf8989 confirm feature: fix typos spotted by ckamm 2015-06-03 15:20:42 +02:00
Olivier Goffart
a621223cc8 SyncEngine: add an api to set the maximum size of new shared folder that do not require confirmation 2015-05-26 14:41:01 +02:00
Olivier Goffart
7bb2834d8b Confirm feature (The sync engine part) 2015-05-26 12:34:07 +02:00
Markus Goetz
3a52db46ad Discovery: Fix another empty-local-directory bug 2015-04-23 16:15:13 +02:00
Markus Goetz
2dbd27af76 Discovery: Initialize error with EIO 2015-04-13 15:36:07 +02:00
Markus Goetz
0634a4d0c6 Discovery: Add a sanity check when results are parsed 2015-04-13 15:10:04 +02:00
Jocelyn Turcotte
4a890eae38 SyncEngine: Fix a crash caused by an invalid DiscoveryDirectoryResult::iterator #3051
The default constructor of the iterator points to NULL, which makes
it != end() but invalid to dereference.

Use an integer index instead to keep 0 as a valid default value that
can always correctly be checked against size().

Also make sure that no data is shared between threads by making the
csync_vio_file_stat_t copyable and passing it as const.
2015-04-08 09:35:43 +02:00
Markus Goetz
7f2213416a Discovery: Add warning if returned etag is 0
There will be another bugfix which fixes
https://gist.github.com/jturcotte/3d5a7874d26bc27b1be9
directory.
2015-04-02 16:57:53 +02:00
Markus Goetz
3f712dce02 ETags: For Folder and RequestEtagJob, always use Concatenation 2015-03-05 17:49:12 +01:00
Markus Goetz
2eaeaf33fa Discovery: Change abort code a bit
Now pressing pause in the UI will not show an error to the user.
2015-03-05 16:50:33 +01:00
Klaas Freitag
f913cd97ee DiscoveryJob: Fix progress display.
This fixes #2909
2015-03-03 16:01:17 +01:00