Commit graph

100 commits

Author SHA1 Message Date
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
Markus Goetz
7595c7e697 Discovery: Free some memory on VIO dir close (#2902) 2015-03-02 14:09:01 +01:00
Olivier Goffart
bd6769a3fd LsColJob: one must now specify the properties
So the discovery phase don't ask for the quota, and the selective sync
don't ask for all the other properties

Issue #2906
2015-03-02 11:03:25 +01:00
Christian Kamm
76ac628153 Discovery: Distinguish 503 Storage not available. #2884 2015-02-25 12:02:10 +01:00
Christian Kamm
08c33cd1dc Discovery: Fix handling of 503 on a folder. #2884 2015-02-25 08:09:07 +01:00
Klaas Freitag
1929040bb7 Discovery: Preserve the error message. 2015-02-24 22:02:31 +01:00
Klaas Freitag
3af936c8a1 Some minor cleanups. 2015-02-24 22:02:29 +01:00
Markus Goetz
12ac9f9aa9 Discovery: Fix broken signal/slots 2015-01-23 15:37:36 +01:00
Markus Goetz
3885d5d706 Discovery: Report root etag from engine to folder
For #2352
2015-01-23 15:30:44 +01:00
Markus Goetz
0502f684e9 Discovery: Even less qDebug 2015-01-22 14:45:08 +01:00
Markus Goetz
dde8e35785 Discovery: Put results into proper place in map
The map is for memory management.
It can later be used as a cache for the recursive PROPFIND
(if we decide to activate it again)
2015-01-22 14:25:24 +01:00
Olivier Goffart
5c2298fa37 Discovery phase: fix a few warnings 2015-01-20 18:50:03 +01:00
Markus Goetz
906779c4b1 SyncEngine: Use QNAM for csync_update
This is for #2507
2015-01-20 18:27:25 +01:00
Daniel Molkentin
ae85aa33fd Adjust namespaces 2014-11-09 22:34:07 +01:00
Daniel Molkentin
dc1e73dcb7 Merge remote-tracking branch 'origin/1.7'
Conflicts:
	src/libsync/syncjournaldb.cpp
	test/CMakeLists.txt
2014-10-28 23:27:58 -04:00
Christian Kamm
7ae0338f5c Merge remote-tracking branch 'origin/1.7'
Conflicts:
	src/CMakeLists.txt
	src/cmd/cmd.cpp
	src/gui/socketapi.h
	src/libsync/syncengine.h
	test/CMakeLists.txt
2014-10-22 10:41:55 +02:00
Daniel Molkentin
e5471d8318 Build after merge 2014-08-26 14:33:21 +02:00
Renamed from src/mirall/discoveryphase.cpp (Browse further)