Commit Graph

565 Commits

Author SHA1 Message Date
Olivier Goffart
112e78ba94 Support for openid connect 2019-11-20 14:32:57 +01:00
Olivier Goffart
50179c3b54 Merge remote-tracking branch 'origin/2.6'
Conflicts:
	.drone.yml
        VERSION.cmake
2019-11-11 11:44:31 +01:00
Olivier Goffart
48d3c8432e VFS: Do not overwrite existing files by placeholder
For issue #7557 and #7556

Note: this change the API of the VFS plugin, so the VFS plugin needs small
adaptations
2019-11-03 17:01:48 +01:00
Olivier Goffart
6b361f2cc2 Merge remote-tracking branch 'origin/2.6' 2019-10-31 17:05:42 +01:00
Olivier Goffart
60d28c44be Test: Fix testsyncvirtualfiles test
Like previous commit, the failure was caused by two conflicting commits
2019-10-30 18:26:16 +01:00
Olivier Goffart
79e9168beb Fix build of tests.
Resulted from a conflict between two patches
2019-10-30 17:51:28 +01:00
Christian Kamm
16a8823e11 Vfs: Lots of tests and corrections for suffix edge cases
Avoid or deal with problems that happen when suffixed files exist on the
server or suffix and non-suffixed files exist locally.

See #7350, #7261.
2019-10-30 14:41:01 +01:00
Olivier Goffart
292e983d7c Merge remote-tracking branch 'origin/2.6' into master 2019-10-14 14:12:03 +02:00
Olivier Goffart
fb84e4c990 When moving is allowed but deleting is not, do not restore moved items
Issue #7293
2019-10-11 13:09:07 +02:00
Olivier Goffart
06e3a98e8d Fix Upload of large (> 2GiB) files
Issue #7506

This is a regression introduced by the delta sync feature (as the chunk offset
changed from being the chunk number to be the byte offset, it needs to be a
qint64 now)
2019-10-09 13:55:06 +02:00
Olivier Goffart
4eeb6483b5 Merge remote-tracking branch 'origin/2.6' 2019-10-08 11:11:05 +02:00
Christian Kamm
ed7ec006f0 Tests: Fail if the initial sync fails 2019-10-08 09:37:29 +02:00
Olivier Goffart
1597b2edc1 Tests: introduce ItemCompletedSpy to avoid a bit of code duplication 2019-10-07 22:36:55 +02:00
Christian Kamm
5f3682a47d Propagate dir: Never write the etag on remote mkdir #7481
It must always only be written once all children are successfully
propagated.
2019-10-07 14:33:15 +02:00
Hannah von Reth
2fcc92dfee Avoid Windows crt warning by an alternative implementation 2019-10-07 14:03:06 +02:00
Christian Kamm
976db2ef84 Test: Disable local discovery parallelism in permission test
Adding parallelism broke the test because it depended on the order of
discovery.
2019-09-16 19:52:19 +02:00
Markus Goetz
e1b31d742c Discovery: List local directories from thread #7456 #7439 2019-09-09 20:41:55 +02:00
Christian Kamm
99fd45051a Discovery: If a move is forbidden, restore the source
Previously the source was deleted (or attempted to be deleted), even if
the new location was not acceptable for upload. This could make data
unavilable on the server.

For #7410
2019-09-02 09:58:59 +02:00
Christian Kamm
1e652e12b5 Propagation: Fix delete-before-rename bug #7441
By introducing a PropagateRootDirectory job that explicitly
separates the directory deletion jobs from all the other jobs.

Note that this means that if there are errors in subJobs the
dirDeletionJobs won't get executed.
2019-08-30 18:33:23 +02:00
Christian Kamm
0f606229f2 Checksums: Fix crash due to threading issue
The checksum computation thread was potentially using a QFile that was
deleted in the gui thread.

For #7368
2019-08-07 21:22:48 +02:00
Christian Kamm
4fd9bdc4b4 Vfs: Remove old db record when dehydrating via rename
For #7338
2019-07-25 15:21:54 +02:00
Christian Kamm
d09c4fd2e8 Vfs: Ensure pins change with (de-)hydration
Previously an implicit hydration of a file in an online-only folder
would not change the pin state and cause a dehydration on the next
sync.
2019-07-24 16:16:39 +02:00
Christian Kamm
199163187a Vfs: Preserve pin state on hydration
For #7322 and #7323
2019-07-18 20:00:28 +02:00
Christian Kamm
aafa903a02 Drone: Skip DatabaseErrorTest
It seems reliable when run manually, but frequently breaks when executed
by drone.
2019-07-15 11:37:59 +02:00
Christian Kamm
75ddb8dd80 Vfs: Make test pass with different suffix #7279 2019-06-28 10:48:18 +02:00
Christian Kamm
6b89747a26 VfsSuffix: Wipe stale pin states #7273
Previously the pin states of deleted files stayed in the 'flags'
database and could be inadvertently reused when a new file with the same
name appeared. Now they are deleted.

To make this work right, the meaning of the 'path' column in the 'flags'
table was changed: Previously it never had the .owncloud file suffix.
Now it's the same as in metadata.path.

This takes the safe parts from #7274 for inclusion in 2.6. The more
elaborate database schema changes (why use 'path' the join the two
tables in the first place?) shall go into master.
2019-06-27 15:57:20 +02:00
Christian Kamm
86b15ffb20 RequestEtagJob: Consistently parse etags #7271
Previously RequestEtagJob did return the etag verbatim (including extra
quotes) while the db had the parsed form. That caused the etag
comparison during discovery move detection to always fail. The test
didn't catch it because the etags there didn't have quotes.

Now:
- RequestEtagJob will parse the etag, leading to a consistent format
- Tests have etags with quotes, detecting the problem
2019-06-27 13:08:18 +02:00
Christian Kamm
02a9b16b0f Vfs: Move pin state if files move #7250
Previously renames of items didn't carry the pin state with them.
2019-06-23 10:23:37 +02:00
Christian Kamm
e653924e06 Vfs: Don't let new local files start out unpinned #7250
If one adds a new file to an online-only folder the previous behavior
was to upload the file in one sync and dehydrate it in the next. Now
these new files get set to Unspecified pin state, making them retain
their data.
2019-06-23 10:23:37 +02:00
Christian Kamm
86d36f0a78 Merge remote-tracking branch 'origin/2.5' into 2.6 2019-06-12 13:23:41 +02:00
Christian Kamm
98ba64e60c Http2: Resend requests on ContentReSend error #7174
Since Qt does not yet transparently resend HTTP2 requests in some cases
we do it manually.

The test showed a problem where the initial non-200 reply would close
the target temporary file and the follow-up request couldn't store any
data. Removing that close() call is safe because there also is a
_saveBodyToFile flag that guards writes to the target file.

(cherry picked from commit 677e44dc53)

Cherry-picked to allow 2.5 users with new enough Qt to test the HTTP2
workaround.
2019-06-12 13:16:32 +02:00
Christian Kamm
677e44dc53 Http2: Resend requests on ContentReSend error #7174
Since Qt does not yet transparently resend HTTP2 requests in some cases
we do it manually.

The test showed a problem where the initial non-200 reply would close
the target temporary file and the follow-up request couldn't store any
data. Removing that close() call is safe because there also is a
_saveBodyToFile flag that guards writes to the target file.
2019-06-07 19:26:19 +02:00
Christian Kamm
962fafaf9e Tests: Fix DB locking issue in permissions test
(cherry picked from commit 3fb4a540da)
2019-06-07 09:30:52 +02:00
Olivier Goffart
cb26f516f7 Discovery: Do not abort the sync in case of error 404 (or 500)
Issue: #7199
2019-06-05 11:09:16 +02:00
Olivier Goffart
819175ad89 SyncEngine: Fix renaming a single file cause the "delete all file" popup
Possibly a regression, since the new discovery discovers rist the renamed
files as removed

Issue #7204
2019-06-04 15:56:35 +02:00
Markus Goetz
dc2a37e813 OAuth2: Better error logging
This does not fix a bug, just was found while spotting a bug that was no bug.
For https://github.com/owncloud/enterprise/issues/2951
2019-05-15 09:58:59 +02:00
Christian Kamm
87cd1c38be Merge remote-tracking branch 'origin/2.5' into 2.6 2019-05-13 07:51:54 +02:00
Christian Kamm
87a6e039a7 Chunked upload: Fix percent encoding in If header #7176 2019-05-07 10:09:18 +02:00
Christian Kamm
3fb4a540da Tests: Fix DB locking issue in permissions test 2019-05-07 08:25:49 +02:00
Christian Kamm
9b01dbae4c Tests: fix vfs availability test case 2019-05-07 08:21:46 +02:00
Christian Kamm
b0886cd9b1 Fix compile for Debian 8 2019-04-29 12:52:07 +02:00
Christian Kamm
96831247e2 Vfs: "free space" only shows when it has an effect #7143
To do this, introduce AllDehydrated availability and rename
SomeDehydrated to Mixed - it now guarantees there are also hydrated
items.
2019-04-23 09:21:17 +02:00
Christian Kamm
1e1340b457 Merge remote-tracking branch 'origin/2.5' into 2.6 2019-04-17 13:43:53 +02:00
Christian Kamm
6a7b138aa6 Discovery: Query data-fingerprint on root item
Previously the property wasn't queried, meaning the fingerprint logic
couldn't get triggered.
2019-04-12 12:18:02 +02:00
Christian Kamm
440c06c54a Discovery: 403 and 503 on root cause error
Previously these result codes during remote discovery of the sync root
would not cause an error and the discovery would get stuck.

Also extends RemoteDiscovery tests to check for errors on the root item.
2019-04-11 13:48:56 +02:00
Christian Kamm
77011e0cde Tests: Allow vfs tests to enable shell integration
Necessary for testing 2b0f32c645
2019-04-10 08:13:46 +02:00
Christian Kamm
2b0f32c645 Vfs: Add 'availability', a simplified, user-facing pin state #7111
The idea is that the user's question is "is this folder's data available
offline?" and not "does this folder have AlwaysLocal pin state?".
The the answers to the two questions can differ: an always-local
folder can have subitems that are not always-local and are dehydrated.

The new availability enum intends to describe the answer to the user's
actual question and can be derived from pin states. If pin states aren't
stored in the database the way of calculating availability will depend
on the vfs plugin.
2019-04-09 12:52:30 +02:00
Christian Kamm
04268becd1 Vfs: Clear up relationship between _type and pin state
The pin state is a per-item attribute that has an effect on _type:
AlwaysLocal dehydrated files will be marked for hydration and OnlineOnly
hydrated files will be marked for dehydration.

Where exactly this effect materializes depends on how the pin states are
stored. If they're stored in the db (suffix) the dbEntry._type is
changed during the discovery.

If the pin state is stored in the filesystem, the localEntry._type must
be adjusted by the plugin's stat callback.

This patch makes pin states behave more consistently between plugins.
Previously with suffix-vfs pin states only had an effect on new remote
files. Now the effect of pinning or unpinning files or directories is as
documented and similar to other plugins.
2019-04-09 12:46:35 +02:00
Christian Kamm
f7d4b29df9 PropagateDirectory: Set initial dir mtime to server mtime #7119
It's still not synced in any way later.
2019-04-09 10:10:41 +02:00
Christian Kamm
ca003823d5 Detect missing server data during discovery #7112
This has two positive effects:
- We can put the error on the particular file that has missing data
- We can sync all other files
2019-04-09 10:09:56 +02:00