nextcloud-desktop.git
5 years ago[Wizard] Make vfs dialog blocking
Hannah von Reth [Fri, 27 Nov 2020 08:58:57 +0000 (09:58 +0100)]
[Wizard] Make vfs dialog blocking

Calling the callback after the receiver was deleted caused a crash
Fixes: #7709
Fixes: #7711
5 years agofixup test
Olivier Goffart [Thu, 6 Feb 2020 10:04:04 +0000 (11:04 +0100)]
fixup test

5 years agoTests: add a couple of move tests
Olivier Goffart [Thu, 6 Feb 2020 09:47:59 +0000 (10:47 +0100)]
Tests: add a couple of move tests

This was an attempt to reproduce #7722, but this actually does not
reproduce it

5 years ago[SSL] Print warning only if something changed
Hannah von Reth [Mon, 10 Feb 2020 12:08:57 +0000 (13:08 +0100)]
[SSL] Print warning only if something changed

5 years ago[SSL] Properly restore user accepted certificats
Hannah von Reth [Mon, 10 Feb 2020 12:08:19 +0000 (13:08 +0100)]
[SSL] Properly restore user accepted certificats

5 years ago[Sanity] Remove old ifdef
Hannah von Reth [Tue, 4 Feb 2020 13:44:02 +0000 (14:44 +0100)]
[Sanity] Remove old ifdef

5 years agoFix saving of cookies
Hannah von Reth [Fri, 24 Jan 2020 16:57:34 +0000 (17:57 +0100)]
Fix saving of cookies

Fixes: #7700
5 years agoDon't hardcode PLUGINDIR
Hannah von Reth [Mon, 24 Feb 2020 12:11:58 +0000 (13:11 +0100)]
Don't hardcode PLUGINDIR

5 years agoMake PluginFactory virtual to silent -Wnon-virtual-dtor warning
Olivier Goffart [Wed, 5 Feb 2020 12:04:52 +0000 (13:04 +0100)]
Make PluginFactory virtual to silent -Wnon-virtual-dtor warning

This is not necessary, but it also shouldn't hurt.

5 years agoSyncEngine: no need to use QAtomicInt
Olivier Goffart [Wed, 5 Feb 2020 11:57:09 +0000 (12:57 +0100)]
SyncEngine: no need to use QAtomicInt

This was done because the propagator jobs where running in a thread a long
time ago, but this is no longer the case.

(Also QAtomicInt::load is marked as deprecated now)

5 years agoProxyAuthHandler Use QPointer instead of QWeakPointer
Olivier Goffart [Wed, 5 Feb 2020 11:52:58 +0000 (12:52 +0100)]
ProxyAuthHandler Use QPointer instead of QWeakPointer

QWeakPointer::data is deprecated.
In this case we should use QPointer

5 years agoRemove old test scripts
Hannah von Reth [Mon, 3 Feb 2020 13:23:09 +0000 (14:23 +0100)]
Remove old test scripts

Fixes: 7679
5 years ago[Core] Include more information about the OS in the user agent
Hannah von Reth [Fri, 10 Jan 2020 15:41:01 +0000 (16:41 +0100)]
[Core] Include more information about the OS in the user agent

5 years agoDon't ignore file sync notification after an unlock
Hannah von Reth [Mon, 16 Dec 2019 15:33:41 +0000 (16:33 +0100)]
Don't ignore file sync notification after an unlock

For a usual file sync event we check for actual changes in the local file,
after an unlock the local file might be unchanged so we need to sync it anyhow.

Fixes: owncloud/enterprise#3609
5 years agoPrepend PLUGINDIR else its pointless
Hannah von Reth [Wed, 4 Dec 2019 12:21:17 +0000 (13:21 +0100)]
Prepend PLUGINDIR else its pointless

5 years agoUse Q_ENUM on AuthType to get the name printed in the log
Hannah von Reth [Thu, 12 Dec 2019 13:33:07 +0000 (14:33 +0100)]
Use Q_ENUM on AuthType to get the name printed in the log

5 years agoAdd Actions to the Desktop file
Hannah von Reth [Thu, 28 Nov 2019 12:07:52 +0000 (13:07 +0100)]
Add Actions to the Desktop file

5 years agoApplication: Allow to quit running instances by commandline
Hannah von Reth [Thu, 28 Nov 2019 10:57:51 +0000 (11:57 +0100)]
Application: Allow to quit running instances by commandline

5 years agoCleanup
Hannah von Reth [Wed, 27 Nov 2019 11:01:44 +0000 (12:01 +0100)]
Cleanup

5 years agoDisable http2 support for now
Hannah von Reth [Mon, 2 Dec 2019 14:30:47 +0000 (15:30 +0100)]
Disable http2 support for now

Issue: #7610

5 years agoDon't show the "All files deleted" popup when unselecting everything with selective...
Olivier Goffart [Wed, 16 Oct 2019 10:12:02 +0000 (12:12 +0200)]
Don't show the "All files deleted" popup when unselecting everything with selective sync

Issue #7337

5 years agoAccountSettings: limit the clickable region of the 'add folder' button
Olivier Goffart [Wed, 16 Oct 2019 08:29:37 +0000 (10:29 +0200)]
AccountSettings: limit the clickable region of the 'add folder' button

Issue #7326

5 years agoNetwork Settings: Show a warning that proxy settings do not apply to localhost
Olivier Goffart [Mon, 21 Oct 2019 10:35:27 +0000 (12:35 +0200)]
Network Settings: Show a warning that proxy settings do not apply to localhost

Only show this if at least one account is detected to have an url that looks
like localhost, because this could otherwise be confusing

Issue #7169

5 years agoDiscovery: Allow more HTTP error code to be treated as ignored dir
Olivier Goffart [Wed, 13 Nov 2019 10:12:32 +0000 (11:12 +0100)]
Discovery: Allow more HTTP error code to be treated as ignored dir

The original code from csync was stopping at any error.
But we have been whitelisting soeme http error code one by one
to ignore the directory instead of aborting the sync.
However, as there are more requests to continue the sync in case
of error, just ignore most HTTP errors

Issue #7586

5 years ago[libsync] Export verifyFileUnchanged
Hannah von Reth [Fri, 15 Nov 2019 15:42:53 +0000 (16:42 +0100)]
[libsync] Export verifyFileUnchanged

This fixes Windows builds that are broken since #7562 was merged

5 years agoVFS: Do not overwrite existing files by placeholder
Olivier Goffart [Wed, 30 Oct 2019 12:16:32 +0000 (13:16 +0100)]
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

5 years ago[Gui] Set proper hdpi attributes
Hannah von Reth [Tue, 5 Nov 2019 16:02:01 +0000 (17:02 +0100)]
[Gui] Set proper hdpi attributes

5 years agoDiscovery: fix TestSyncVirtualFiles::testExtraFilesLocalDehydrated on windows
Olivier Goffart [Thu, 31 Oct 2019 09:41:38 +0000 (10:41 +0100)]
Discovery: fix TestSyncVirtualFiles::testExtraFilesLocalDehydrated on windows

On windows we do a test to know if we should change the case of the files,
but that conflict with the test that checks if the file was still there
when the filename is actually the same. Which can happen with virtual files
as they have two representation (the one with and without suffix).

5 years agoTest: Fix testsyncvirtualfiles test
Olivier Goffart [Wed, 30 Oct 2019 17:25:52 +0000 (18:25 +0100)]
Test: Fix testsyncvirtualfiles test

Like previous commit, the failure was caused by two conflicting commits

5 years agoFix build of tests.
Olivier Goffart [Wed, 30 Oct 2019 16:49:25 +0000 (17:49 +0100)]
Fix build of tests.

Resulted from a conflict between two patches

5 years agoVfs: Lots of tests and corrections for suffix edge cases
Christian Kamm [Fri, 2 Aug 2019 12:25:40 +0000 (14:25 +0200)]
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.

5 years agoDiscovery: Attempt to fix issue with windows VFS and new files
Olivier Goffart [Tue, 29 Oct 2019 12:20:25 +0000 (13:20 +0100)]
Discovery: Attempt to fix issue with windows VFS and new files

(or moved files)
As seen in the log of #7558, a conflict may be issued by mistake.

See investigation in https://github.com/owncloud/client/issues/7558#issuecomment-547385362

This hopefully fix #7558

5 years agoAccount Settings: change the color of info message from green to blue
Olivier Goffart [Tue, 15 Oct 2019 12:12:47 +0000 (14:12 +0200)]
Account Settings: change the color of info message from green to blue

To avoid confusion with the color of "success"

Issue #7403

5 years agoWizard: fix compilation warnings about unused variables
Olivier Goffart [Mon, 14 Oct 2019 11:22:46 +0000 (13:22 +0200)]
Wizard: fix compilation warnings about unused variables

5 years agoSyncEngine: Save a bit of memory by not keeping a set of all filename
Olivier Goffart [Mon, 14 Oct 2019 11:19:41 +0000 (13:19 +0200)]
SyncEngine: Save a bit of memory by not keeping a set of all filename

This is only used for conflict files, so only save conflict files.
(The _seenFile was used for other things in 2.5, but not anymore)

5 years agoWhen moving is allowed but deleting is not, do not restore moved items
Olivier Goffart [Thu, 10 Oct 2019 11:24:24 +0000 (13:24 +0200)]
When moving is allowed but deleting is not, do not restore moved items

Issue #7293

5 years agoRestoration items should appear in the sync protocol
Olivier Goffart [Thu, 10 Oct 2019 11:21:28 +0000 (13:21 +0200)]
Restoration items should appear in the sync protocol

When an item is downloaded because it is restored, it shall be shown in the
sync protocol.
(It is also going to be shown in the not synchronized for a short while, but
that's fine)

5 years agoFix Upload of large (> 2GiB) files
Olivier Goffart [Wed, 9 Oct 2019 07:31:00 +0000 (09:31 +0200)]
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)

5 years agoTests: Fail if the initial sync fails
Christian Kamm [Mon, 7 Oct 2019 12:58:59 +0000 (14:58 +0200)]
Tests: Fail if the initial sync fails

5 years agoDiscovery: Distinguish readdir and closedir errors
Christian Kamm [Mon, 7 Oct 2019 12:58:31 +0000 (14:58 +0200)]
Discovery: Distinguish readdir and closedir errors

5 years agoTests: introduce ItemCompletedSpy to avoid a bit of code duplication
Olivier Goffart [Mon, 7 Oct 2019 13:25:36 +0000 (15:25 +0200)]
Tests: introduce ItemCompletedSpy to avoid a bit of code duplication

5 years agoFix warning about serverJob not being used
Olivier Goffart [Mon, 7 Oct 2019 08:49:23 +0000 (10:49 +0200)]
Fix warning about serverJob not being used

And fix a FIXME in the same time

5 years agoPropagate dir: Never write the etag on remote mkdir #7481
Christian Kamm [Mon, 23 Sep 2019 13:52:57 +0000 (15:52 +0200)]
Propagate dir: Never write the etag on remote mkdir #7481

It must always only be written once all children are successfully
propagated.

5 years agoEnsure the url is complete before we validate it
Hannah von Reth [Wed, 25 Sep 2019 11:45:20 +0000 (13:45 +0200)]
Ensure the url is complete before we validate it

Fixes: #6722
5 years agoChecksums: Explicitly close file before reporting result
Christian Kamm [Mon, 23 Sep 2019 14:58:56 +0000 (16:58 +0200)]
Checksums: Explicitly close file before reporting result

To ensure it's no longer open when the finished signal fires.

5 years agoTest: Disable local discovery parallelism in permission test
Christian Kamm [Thu, 12 Sep 2019 07:13:04 +0000 (09:13 +0200)]
Test: Disable local discovery parallelism in permission test

Adding parallelism broke the test because it depended on the order of
discovery.

5 years agoDiscovery: Change local job signal signatures
Christian Kamm [Wed, 11 Sep 2019 12:55:58 +0000 (14:55 +0200)]
Discovery: Change local job signal signatures

To make it more explicit that data a copy of the data is transfered
between threads. (though Qt will make a copy of the arguments anyway)

5 years agoDiscovery: local job shouldn't be parented
Christian Kamm [Wed, 11 Sep 2019 12:49:20 +0000 (14:49 +0200)]
Discovery: local job shouldn't be parented

Since it'll be deleted by the thread pool.

5 years agoDon't store pointer to local job
Christian Kamm [Wed, 11 Sep 2019 09:03:27 +0000 (11:03 +0200)]
Don't store pointer to local job

There were crashes in the QPointer assignment. Possibly the thread pool
is done with the job and deletes it before the assignment is done.

5 years agoDiscovery: List local directories from thread #7456 #7439
Markus Goetz [Mon, 9 Sep 2019 13:41:57 +0000 (15:41 +0200)]
Discovery: List local directories from thread #7456 #7439

5 years agoReconcile: Sort already during discovery #7445
Markus Goetz [Fri, 6 Sep 2019 10:58:56 +0000 (12:58 +0200)]
Reconcile: Sort already during discovery #7445

5 years agoConnectionValidator: increase timeout to 57s #7456
Christian Kamm [Fri, 6 Sep 2019 12:33:37 +0000 (14:33 +0200)]
ConnectionValidator: increase timeout to 57s #7456

When the gui thread blocks for several seconds it's possible for the
ConnectionValidator to timeout and decide that the account is
unreachable. It will then terminate all sync runs.

Increasing the timeout makes this less likely to happen. The tradeoff is
that real disconnects will not be detected as quickly.

This does not address the root cause but makes the symptom less likely
to appear.

5 years agoPropagator: Delay job execution a bit #7439
Markus Goetz [Thu, 29 Aug 2019 12:04:48 +0000 (14:04 +0200)]
Propagator: Delay job execution a bit #7439

5 years agoDiscovery: Remove level of indent around moves
Christian Kamm [Wed, 28 Aug 2019 12:22:34 +0000 (14:22 +0200)]
Discovery: Remove level of indent around moves

No code changes.

5 years agoDiscovery: If a move is forbidden, restore the source
Christian Kamm [Wed, 28 Aug 2019 12:20:40 +0000 (14:20 +0200)]
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

5 years agoPropagation: Fix delete-before-rename bug #7441
Christian Kamm [Fri, 30 Aug 2019 10:05:50 +0000 (12:05 +0200)]
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.

5 years agoPropagator: Make sure we schedule only one job #7439
Markus Goetz [Fri, 30 Aug 2019 09:37:07 +0000 (11:37 +0200)]
Propagator: Make sure we schedule only one job #7439

To not starve the event loop.
(There is still ~= 3 jobs running at the same time)

5 years agoPropagateDownload: Don't try to open readonly temporaries
Christian Kamm [Fri, 23 Aug 2019 12:49:24 +0000 (14:49 +0200)]
PropagateDownload: Don't try to open readonly temporaries

This situation could arrise when receiving a read-only share and the
temporary rename failed for some reason.

See #7419

5 years agoChange Windows virtual files description to tech preview
Hannah von Reth [Thu, 22 Aug 2019 09:41:23 +0000 (11:41 +0200)]
Change Windows virtual files description to tech preview

5 years agoDon't fatal on "Storage temporarily unavailable"
Christian Kamm [Mon, 12 Aug 2019 07:07:56 +0000 (09:07 +0200)]
Don't fatal on "Storage temporarily unavailable"

This is an unreliable workaround. The real fix will need to be deferred
to another release.

For #5088

5 years agoOwncloudWizard: Mark vfs as tech preview instead of experimental
Hannah von Reth [Thu, 15 Aug 2019 11:58:25 +0000 (13:58 +0200)]
OwncloudWizard: Mark vfs as tech preview instead of experimental

5 years agoCMake VFS: Enable us to provided vfs plugins from an external directory
Hannah von Reth [Thu, 15 Aug 2019 11:13:44 +0000 (13:13 +0200)]
CMake VFS: Enable us to provided vfs plugins from an external directory

5 years agoSocketApi: Avoid unneccessary conversions
Dominik Schmidt [Thu, 6 Jun 2019 09:48:44 +0000 (11:48 +0200)]
SocketApi: Avoid unneccessary conversions

5 years agoSocketApi: cleanup debug output
Dominik Schmidt [Thu, 6 Jun 2019 09:48:31 +0000 (11:48 +0200)]
SocketApi: cleanup debug output

5 years agoAdd ASYNC_ASSERT_ICON_IS_EQUAL command to SocketApi
Dominik Schmidt [Wed, 5 Jun 2019 19:04:40 +0000 (21:04 +0200)]
Add ASYNC_ASSERT_ICON_IS_EQUAL command to SocketApi

5 years agoMake findWidget more powerful
Dominik Schmidt [Wed, 5 Jun 2019 19:04:16 +0000 (21:04 +0200)]
Make findWidget more powerful

5 years agoAdd Q_PROPERTYs for gui testing
Dominik Schmidt [Wed, 5 Jun 2019 18:57:15 +0000 (20:57 +0200)]
Add Q_PROPERTYs for gui testing

5 years agoSwitch GUI Testing SocketApi to Utf8
Dominik Schmidt [Tue, 23 Apr 2019 12:22:45 +0000 (14:22 +0200)]
Switch GUI Testing SocketApi to Utf8

5 years agoFix build with recent Clang (on Linux)
Dominik Schmidt [Tue, 4 Apr 2017 13:34:32 +0000 (15:34 +0200)]
Fix build with recent Clang (on Linux)

5 years agoAdd GUI testing SocketApi extension
Dominik Schmidt [Thu, 30 Mar 2017 11:24:04 +0000 (13:24 +0200)]
Add GUI testing SocketApi extension

5 years agoDon't use mutable lambdas as they hide where we modify work on a copy
Hannah von Reth [Wed, 21 Aug 2019 09:52:11 +0000 (11:52 +0200)]
Don't use mutable lambdas as they hide where we modify work on a copy

5 years agoAccountSettings: Use switch, case to ensure we handle all cases
Hannah von Reth [Tue, 20 Aug 2019 15:28:19 +0000 (17:28 +0200)]
AccountSettings: Use switch, case to ensure we handle all cases

5 years agoChecksums: Add back QIODevice api
Christian Kamm [Thu, 15 Aug 2019 12:04:31 +0000 (14:04 +0200)]
Checksums: Add back QIODevice api

Because the winvfs plugin needs it. But be more careful about the
device's lifetime this time.

5 years agoRemove maxLogLines config option
Christian Kamm [Mon, 12 Aug 2019 10:44:08 +0000 (12:44 +0200)]
Remove maxLogLines config option

It's no longer used.

For owncloud/docs#1365

5 years agoDownload: Don't trigger too many concurrent hash computations
Christian Kamm [Mon, 12 Aug 2019 06:23:40 +0000 (08:23 +0200)]
Download: Don't trigger too many concurrent hash computations

Previously the job would only become "active" when the downloads
started. That meant that arbitrarily many hash computations could be
queued at the same time.

Since the the file was opened during future creation this could lead to
a "too many open files" problem if there were lots of new-new conflicts.

To change this:
- Make PropagateDownload become active when computing a hash
  asynchronously.
- Make the computation future open the file only once it gets run. This
  will make it less likely for this problem to occur even if thousands
  of these futures are queued.

For #7372

5 years agoFix 'unused parameter name' warnings
Christian Kamm [Mon, 12 Aug 2019 06:08:26 +0000 (08:08 +0200)]
Fix 'unused parameter name' warnings

5 years agoChecksums: Fix crash due to threading issue
Christian Kamm [Wed, 7 Aug 2019 09:14:30 +0000 (11:14 +0200)]
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

5 years agoAccountSettings: Fetch subitems after wiping them
Christian Kamm [Fri, 26 Jul 2019 08:16:59 +0000 (10:16 +0200)]
AccountSettings: Fetch subitems after wiping them

That helps avoid empty lists after account creation #7336

5 years agoSyncEngine: Don't duplicate fatal errors
Christian Kamm [Tue, 30 Jul 2019 11:40:52 +0000 (13:40 +0200)]
SyncEngine: Don't duplicate fatal errors

Previously fatal error texts were duplicated: Once they entered the
SyncResult via the SyncFileItem and once via syncError().

syncError is intended for folder-wide sync issues that are not pinned
to particular files. Thus that duplicated path is removed.

For #5088

5 years agoDiscovery: Parse etag to be consistent with RequestEtagJob
Christian Kamm [Fri, 26 Jul 2019 08:00:19 +0000 (10:00 +0200)]
Discovery: Parse etag to be consistent with RequestEtagJob

This avoids unnecessary sync runs.

For #7345

5 years agoVfs: Require local discovery after disabling vfs
Christian Kamm [Thu, 25 Jul 2019 13:14:51 +0000 (15:14 +0200)]
Vfs: Require local discovery after disabling vfs

Without it local files aren't guaranteed to be downloaded #6936.

5 years agoVfs: Remove old db record when dehydrating via rename
Christian Kamm [Wed, 24 Jul 2019 14:07:28 +0000 (16:07 +0200)]
Vfs: Remove old db record when dehydrating via rename

For #7338

5 years agoVfs: Make move detection work with virtual files #7001
Christian Kamm [Wed, 24 Jul 2019 13:07:20 +0000 (15:07 +0200)]
Vfs: Make move detection work with virtual files #7001

Previously a checksum computation could be done on a suffix-placeholder
file, making discovery believe that no move took place.

5 years agoVfs: Ensure pins change with (de-)hydration
Christian Kamm [Wed, 24 Jul 2019 13:25:02 +0000 (15:25 +0200)]
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.

5 years agoVfs: Add hook to allow update-metadata for unchanged files
Christian Kamm [Tue, 23 Jul 2019 12:26:46 +0000 (14:26 +0200)]
Vfs: Add hook to allow update-metadata for unchanged files

Allows winvfs to convert files to placeholders when vfs is enabled. This
is required to mark files as in-sync #7329.

5 years agoVfs: Improve strings for availability states
Christian Kamm [Wed, 17 Jul 2019 13:15:54 +0000 (15:15 +0200)]
Vfs: Improve strings for availability states

5 years agoVfs: Preserve pin state on hydration
Christian Kamm [Thu, 18 Jul 2019 13:30:40 +0000 (15:30 +0200)]
Vfs: Preserve pin state on hydration

For #7322 and #7323

5 years agoVfs: Retain existing data when enabling vfs #7302
Christian Kamm [Wed, 10 Jul 2019 11:34:17 +0000 (13:34 +0200)]
Vfs: Retain existing data when enabling vfs #7302

Previously all local data was deleted because the root folder was marked
as OnlineOnly.

5 years agoAdd missing OWNCLOUDSYNC_EXPORT
Dominik Schmidt [Fri, 28 Jun 2019 15:26:54 +0000 (17:26 +0200)]
Add missing OWNCLOUDSYNC_EXPORT

5 years agoVfs: Make test pass with different suffix #7279
Christian Kamm [Fri, 28 Jun 2019 08:44:13 +0000 (10:44 +0200)]
Vfs: Make test pass with different suffix #7279

5 years agoVfsSuffix: Wipe stale pin states #7273
Christian Kamm [Thu, 27 Jun 2019 13:47:04 +0000 (15:47 +0200)]
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.

5 years agoRequestEtagJob: Consistently parse etags #7271
Christian Kamm [Fri, 21 Jun 2019 13:29:42 +0000 (15:29 +0200)]
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

5 years agoUploadDevice: Fix windows issues #7264
Christian Kamm [Fri, 21 Jun 2019 09:34:59 +0000 (11:34 +0200)]
UploadDevice: Fix windows issues #7264

- Close the UploadDevice to close the QFile after the PUT job is done.
  This allows winvfs to get an oplock on the file later.

- Don't rely on QFile::fileName() to be valid after
  openAndSeekFileSharedRead() was called. The way it is openend on
  Windows makes it have an empty filename.

5 years agoVfs: Move pin state if files move #7250
Christian Kamm [Fri, 21 Jun 2019 07:39:33 +0000 (09:39 +0200)]
Vfs: Move pin state if files move #7250

Previously renames of items didn't carry the pin state with them.

5 years agoVfs: Don't let new local files start out unpinned #7250
Christian Kamm [Fri, 21 Jun 2019 07:06:07 +0000 (09:06 +0200)]
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.

5 years agoOAuth2: Better error logging
Markus Goetz [Tue, 14 May 2019 12:00:14 +0000 (14:00 +0200)]
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

5 years agoUpload: Read file chunks gradually #7226
Christian Kamm [Thu, 6 Jun 2019 10:22:02 +0000 (12:22 +0200)]
Upload: Read file chunks gradually #7226

Instead of all at once, to reduce peak memory use.

Changing UploadDevice in this way requires keeping the file open for the
duration of the upload. It also means changes to open(), seek(), close()
to ensure that uses of the device work right when a request needs to
be resent.

5 years agoHttp2: Resend requests on ContentReSend error #7174
Christian Kamm [Wed, 5 Jun 2019 13:24:57 +0000 (15:24 +0200)]
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.

5 years agoDiscovery: Do not abort the sync in case of error 404 (or 500)
Olivier Goffart [Tue, 4 Jun 2019 14:00:43 +0000 (16:00 +0200)]
Discovery: Do not abort the sync in case of error 404 (or 500)

Issue: #7199

5 years agoSyncEngine: Fix renaming a single file cause the "delete all file" popup
Olivier Goffart [Tue, 4 Jun 2019 10:08:15 +0000 (12:08 +0200)]
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