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
Olivier Goffart [Thu, 6 Feb 2020 10:04:04 +0000 (11:04 +0100)]
fixup test
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
Hannah von Reth [Mon, 10 Feb 2020 12:08:57 +0000 (13:08 +0100)]
[SSL] Print warning only if something changed
Hannah von Reth [Mon, 10 Feb 2020 12:08:19 +0000 (13:08 +0100)]
[SSL] Properly restore user accepted certificats
Hannah von Reth [Tue, 4 Feb 2020 13:44:02 +0000 (14:44 +0100)]
[Sanity] Remove old ifdef
Hannah von Reth [Fri, 24 Jan 2020 16:57:34 +0000 (17:57 +0100)]
Fix saving of cookies
Fixes: #7700
Hannah von Reth [Mon, 24 Feb 2020 12:11:58 +0000 (13:11 +0100)]
Don't hardcode PLUGINDIR
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.
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)
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
Hannah von Reth [Mon, 3 Feb 2020 13:23:09 +0000 (14:23 +0100)]
Remove old test scripts
Fixes: 7679
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
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
Hannah von Reth [Wed, 4 Dec 2019 12:21:17 +0000 (13:21 +0100)]
Prepend PLUGINDIR else its pointless
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
Hannah von Reth [Thu, 28 Nov 2019 12:07:52 +0000 (13:07 +0100)]
Add Actions to the Desktop file
Hannah von Reth [Thu, 28 Nov 2019 10:57:51 +0000 (11:57 +0100)]
Application: Allow to quit running instances by commandline
Hannah von Reth [Wed, 27 Nov 2019 11:01:44 +0000 (12:01 +0100)]
Cleanup
Hannah von Reth [Mon, 2 Dec 2019 14:30:47 +0000 (15:30 +0100)]
Disable http2 support for now
Issue: #7610
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
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
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
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
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
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
Hannah von Reth [Tue, 5 Nov 2019 16:02:01 +0000 (17:02 +0100)]
[Gui] Set proper hdpi attributes
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).
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
Olivier Goffart [Wed, 30 Oct 2019 16:49:25 +0000 (17:49 +0100)]
Fix build of tests.
Resulted from a conflict between two patches
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.
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
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
Olivier Goffart [Mon, 14 Oct 2019 11:22:46 +0000 (13:22 +0200)]
Wizard: fix compilation warnings about unused variables
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)
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
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)
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)
Christian Kamm [Mon, 7 Oct 2019 12:58:59 +0000 (14:58 +0200)]
Tests: Fail if the initial sync fails
Christian Kamm [Mon, 7 Oct 2019 12:58:31 +0000 (14:58 +0200)]
Discovery: Distinguish readdir and closedir errors
Olivier Goffart [Mon, 7 Oct 2019 13:25:36 +0000 (15:25 +0200)]
Tests: introduce ItemCompletedSpy to avoid a bit of code duplication
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
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.
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
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.
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.
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)
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.
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.
Markus Goetz [Mon, 9 Sep 2019 13:41:57 +0000 (15:41 +0200)]
Discovery: List local directories from thread #7456 #7439
Markus Goetz [Fri, 6 Sep 2019 10:58:56 +0000 (12:58 +0200)]
Reconcile: Sort already during discovery #7445
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.
Markus Goetz [Thu, 29 Aug 2019 12:04:48 +0000 (14:04 +0200)]
Propagator: Delay job execution a bit #7439
Christian Kamm [Wed, 28 Aug 2019 12:22:34 +0000 (14:22 +0200)]
Discovery: Remove level of indent around moves
No code changes.
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
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.
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)
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
Hannah von Reth [Thu, 22 Aug 2019 09:41:23 +0000 (11:41 +0200)]
Change Windows virtual files description to tech preview
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
Hannah von Reth [Thu, 15 Aug 2019 11:58:25 +0000 (13:58 +0200)]
OwncloudWizard: Mark vfs as tech preview instead of experimental
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
Dominik Schmidt [Thu, 6 Jun 2019 09:48:44 +0000 (11:48 +0200)]
SocketApi: Avoid unneccessary conversions
Dominik Schmidt [Thu, 6 Jun 2019 09:48:31 +0000 (11:48 +0200)]
SocketApi: cleanup debug output
Dominik Schmidt [Wed, 5 Jun 2019 19:04:40 +0000 (21:04 +0200)]
Add ASYNC_ASSERT_ICON_IS_EQUAL command to SocketApi
Dominik Schmidt [Wed, 5 Jun 2019 19:04:16 +0000 (21:04 +0200)]
Make findWidget more powerful
Dominik Schmidt [Wed, 5 Jun 2019 18:57:15 +0000 (20:57 +0200)]
Add Q_PROPERTYs for gui testing
Dominik Schmidt [Tue, 23 Apr 2019 12:22:45 +0000 (14:22 +0200)]
Switch GUI Testing SocketApi to Utf8
Dominik Schmidt [Tue, 4 Apr 2017 13:34:32 +0000 (15:34 +0200)]
Fix build with recent Clang (on Linux)
Dominik Schmidt [Thu, 30 Mar 2017 11:24:04 +0000 (13:24 +0200)]
Add GUI testing SocketApi extension
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
Hannah von Reth [Tue, 20 Aug 2019 15:28:19 +0000 (17:28 +0200)]
AccountSettings: Use switch, case to ensure we handle all cases
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.
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
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
Christian Kamm [Mon, 12 Aug 2019 06:08:26 +0000 (08:08 +0200)]
Fix 'unused parameter name' warnings
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
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
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
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
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.
Christian Kamm [Wed, 24 Jul 2019 14:07:28 +0000 (16:07 +0200)]
Vfs: Remove old db record when dehydrating via rename
For #7338
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.
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.
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.
Christian Kamm [Wed, 17 Jul 2019 13:15:54 +0000 (15:15 +0200)]
Vfs: Improve strings for availability states
Christian Kamm [Thu, 18 Jul 2019 13:30:40 +0000 (15:30 +0200)]
Vfs: Preserve pin state on hydration
For #7322 and #7323
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.
Dominik Schmidt [Fri, 28 Jun 2019 15:26:54 +0000 (17:26 +0200)]
Add missing OWNCLOUDSYNC_EXPORT
Christian Kamm [Fri, 28 Jun 2019 08:44:13 +0000 (10:44 +0200)]
Vfs: Make test pass with different suffix #7279
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.
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
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.
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.
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.
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
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.
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.
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
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