nextcloud-desktop.git
5 years agoDiscovery: Improvements to doc comments
Christian Kamm [Fri, 12 Apr 2019 08:43:34 +0000 (10:43 +0200)]
Discovery: Improvements to doc comments

5 years agoDiscovery: Query data-fingerprint on root item
Christian Kamm [Fri, 12 Apr 2019 08:59:24 +0000 (10:59 +0200)]
Discovery: Query data-fingerprint on root item

Previously the property wasn't queried, meaning the fingerprint logic
couldn't get triggered.

5 years agoDiscovery: 403 and 503 on root cause error
Christian Kamm [Wed, 10 Apr 2019 09:07:15 +0000 (11:07 +0200)]
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.

5 years agoPropagateIgnore: Default to NormalError for INSTRUCTION_ERROR
Christian Kamm [Wed, 10 Apr 2019 08:48:03 +0000 (10:48 +0200)]
PropagateIgnore: Default to NormalError for INSTRUCTION_ERROR

Previously if one set the instruction to ERROR while forgetting to set
an error status, it'd propagate as FileIgnored. Now the default is
NormalError for INSTRUCTION_ERROR and FileIgnored for
INSTRUCTION_IGNORE.

5 years agoAbout: Add remark about vfs plugin that's in use #7137
Christian Kamm [Wed, 10 Apr 2019 11:40:43 +0000 (13:40 +0200)]
About: Add remark about vfs plugin that's in use #7137

5 years agoFix windows build
Christian Kamm [Wed, 10 Apr 2019 06:18:49 +0000 (08:18 +0200)]
Fix windows build

5 years agoLogWindow: Remove output, add "go to log folder" button #6475
Christian Kamm [Fri, 15 Mar 2019 11:12:13 +0000 (12:12 +0100)]
LogWindow: Remove output, add "go to log folder" button #6475

5 years agoVfs: Add 'availability', a simplified, user-facing pin state #7111
Christian Kamm [Wed, 3 Apr 2019 08:53:04 +0000 (10:53 +0200)]
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.

5 years agoVfs: Clear up relationship between _type and pin state
Christian Kamm [Wed, 3 Apr 2019 11:32:05 +0000 (13:32 +0200)]
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.

5 years agoSqlite: Update to 3.27.2
Christian Kamm [Fri, 1 Mar 2019 09:54:37 +0000 (10:54 +0100)]
Sqlite: Update to 3.27.2

5 years agoPropagateDirectory: Set initial dir mtime to server mtime #7119
Christian Kamm [Fri, 29 Mar 2019 09:16:09 +0000 (10:16 +0100)]
PropagateDirectory: Set initial dir mtime to server mtime #7119

It's still not synced in any way later.

5 years agoPropagateDirectory: Remove dead code
Christian Kamm [Fri, 29 Mar 2019 09:14:31 +0000 (10:14 +0100)]
PropagateDirectory: Remove dead code

1. The _firstJob is usually deleted by the time the PropagateDirectory
   finishes. (deleteLater() is called early)
2. The PropagateDirectory::_item and PropagateRemoteMkdir::_item point
   to the same SyncFileItem anyway. This code is a leftover from when
   each job had its own instance.

5 years agoDetect missing server data during discovery #7112
Christian Kamm [Tue, 26 Mar 2019 10:19:42 +0000 (11:19 +0100)]
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

5 years agoVfs: Better handling and more tests for suffix file renames
Christian Kamm [Tue, 2 Apr 2019 09:51:47 +0000 (11:51 +0200)]
Vfs: Better handling and more tests for suffix file renames

Previously removing the vfs suffix of a file always triggered a
conflict. Now it may just cause a file download.

This was done because users expected symmetry in the rename actions and
renaming foo -> foo.owncloud already triggers the "make the file
virtual" action. Now foo.owncloud -> foo triggers the "download the
contents" action.

5 years agoVfs suffix: Require suffix when creating placeholder files
Christian Kamm [Fri, 29 Mar 2019 08:36:45 +0000 (09:36 +0100)]
Vfs suffix: Require suffix when creating placeholder files

5 years agoVfs: Hydrating a virtual is SYNC not NEW #7101
Christian Kamm [Mon, 25 Mar 2019 09:53:13 +0000 (10:53 +0100)]
Vfs: Hydrating a virtual is SYNC not NEW #7101

Previously it'd be NEW(ItemTypeFile), but now it has changed to be
SYNC(ItemTypeVirtualFileDownload) which allows better classification.

5 years agoNotifications: Don't say "downloaded" for new files #7101
Christian Kamm [Mon, 25 Mar 2019 09:52:34 +0000 (10:52 +0100)]
Notifications: Don't say "downloaded" for new files #7101

These files may very well just be new virtual files that were explicitly
*not* downloaded.

5 years agoLocal discovery tracking: On success, also wipe _renameTarget
Christian Kamm [Thu, 28 Mar 2019 08:33:20 +0000 (09:33 +0100)]
Local discovery tracking: On success, also wipe _renameTarget

It's possible that the rename target was in the local discovery list.

5 years agoProtocol, Notifications: Show destination() instead of _file
Christian Kamm [Thu, 28 Mar 2019 08:32:01 +0000 (09:32 +0100)]
Protocol, Notifications: Show destination() instead of _file

destination() now consistently points to the file after the successful
sync operation. _file might be the place the item was moved from.

5 years agoFix and test _file and _renameTarget
Christian Kamm [Thu, 28 Mar 2019 08:10:20 +0000 (09:10 +0100)]
Fix and test _file and _renameTarget

There was a bunch of inconsistency around whether _file was set to
_renameTarget or not. This is now never done, passing on more
information.

5 years agoTest: fix compilation with GCC 4.9
Olivier Goffart [Fri, 22 Mar 2019 15:34:41 +0000 (16:34 +0100)]
Test: fix compilation with GCC 4.9

It does not appear to support variadic lambda

5 years agoVFS: Unbreak behavior for rename+hydrate #7001
Christian Kamm [Thu, 7 Mar 2019 13:35:39 +0000 (14:35 +0100)]
VFS: Unbreak behavior for rename+hydrate #7001

Users can rename a file *and* add/remove the vfs suffix at the same time
leading to very complex sync actions. This patch doesn't add support for
them, but adds tests and makes sure these cases do not cause unintened
behavior.

The rename will be propagated, but the users's hydrate/dehydrate request
will be ignored.

5 years agoAsync Poll: keep the size in the database
Olivier Goffart [Thu, 14 Mar 2019 11:08:47 +0000 (12:08 +0100)]
Async Poll: keep the size in the database

This was not required with 2.5 because a size of 0 was ignorted when comparing
size by the csync updater, to be compatible with very old version of the database.
But the we discovery will still think the file is changed if the database contains
a size of 0

5 years agoUpload: asynchronious operations
Olivier Goffart [Mon, 25 Jun 2018 15:47:52 +0000 (17:47 +0200)]
Upload: asynchronious operations

Implements https://github.com/owncloud/core/pull/31851

5 years agomacOS: Fix vfs suffix plugin paths #7090
Markus Goetz [Fri, 15 Mar 2019 12:56:11 +0000 (13:56 +0100)]
macOS: Fix vfs suffix plugin paths #7090

5 years agoLinux: Add autostart delay to avoid tray issues #6518
Christian Kamm [Wed, 13 Mar 2019 09:47:41 +0000 (10:47 +0100)]
Linux: Add autostart delay to avoid tray issues #6518

It seems that sometimes the tray implementation isn't ready on system
startup. Retrying later seems to not help. Delaying the start of the
client is the workaround that people have reported as effective.

5 years agoSocketApi: Fix owncloud/enterprise#2938
Markus Goetz [Fri, 31 Aug 2018 13:03:33 +0000 (15:03 +0200)]
SocketApi: Fix owncloud/enterprise#2938

5 years agoTray: Try to establish tray after 10s if failed initially #6518
Christian Kamm [Wed, 6 Mar 2019 09:55:45 +0000 (10:55 +0100)]
Tray: Try to establish tray after 10s if failed initially #6518

When owncloud is started during desktop startup the tray may not yet
be running when the client starts. This will make the client attempt
to create a tray icon again after 10 seconds if there's no tray
during initial startup.

5 years agoOwnSql: Distinguish no-data from error #6677
Christian Kamm [Mon, 4 Mar 2019 12:58:38 +0000 (13:58 +0100)]
OwnSql: Distinguish no-data from error #6677

This could fix a problem where the client incorrectly decides to delete
local data.

Previously any sqlite3_step() return value that wasn't SQLITE_ROW would
be interpreted as "there's no more data here". Thus an sqlite error at a
bad time could cause the remote discovery to fail to read an unchanged
subtree from the database. These files would then be deleted locally.

With this change sqlite errors from sqlite3_step are detected and
logged. For the particular case of SyncJournalDb::getFilesBelowPath()
the error will now be propagated and the sync run will fail instead of
performing spurious deletes.

Note that many other database functions still don't distinguish
not-found from error cases. Most of them won't have as severe effects on
affected sync runs though.

5 years agoClient certs: Store pkcs12 in config, password in keychain
Christian Kamm [Tue, 19 Feb 2019 10:38:46 +0000 (11:38 +0100)]
Client certs: Store pkcs12 in config, password in keychain

It still reads and writes the old format too, but all newly stored
client certs will be in the new form.

For #6776 because Windows limits credential data to 512 bytes in older
versions.

5 years agoAdd PLUGINDIR cmake setting and define #7027
Christian Kamm [Thu, 7 Mar 2019 09:58:40 +0000 (10:58 +0100)]
Add PLUGINDIR cmake setting and define #7027

By default, plugins are only searched next to the binary or next to the
other Qt plugins. This optional build variable allows another path to be
configured.

The idea is that on linux the oC packaging probably wants the binary in
something like /opt/owncloud/bin and the plugins in
/opt/owncloud/lib/plugins.

Similarly, distribution packagers probably don't want the plugins next
to the binary or next to the other Qt plugins. This flag allows them to
configure another path that the executable will look in.

5 years agoAccountManager: load the cookies
Olivier Goffart [Fri, 1 Mar 2019 07:46:33 +0000 (08:46 +0100)]
AccountManager: load the cookies

For issue #7054

5 years agoWindows: Forbid chars 0-31 in filenames #6987
Christian Kamm [Fri, 1 Mar 2019 08:33:55 +0000 (09:33 +0100)]
Windows: Forbid chars 0-31 in filenames #6987

5 years agoSelective sync: Don't collapse tree when entering mode #7055
Christian Kamm [Thu, 28 Feb 2019 07:15:46 +0000 (08:15 +0100)]
Selective sync: Don't collapse tree when entering mode #7055

doExpand() is called when the selective sync editing mode is enabled in
the folder settings view. Previously it'd set the expansion to be
exactly the root items. Now, it just expands any root items that are
currently collapsed, leaving all other item expansion unchanged.

5 years agoSocketApi: Fix crash with readyRead() after disconnected() #7044
Christian Kamm [Mon, 18 Feb 2019 09:53:41 +0000 (10:53 +0100)]
SocketApi: Fix crash with readyRead() after disconnected() #7044

With the recent bugfix to avoid sending messages on dead connections
0bfe7ac250c54f5415c0a794c7b271428e83c3cf
the client now crashed if readyRead() was received after disconnected()
for the socket as the listener for that connection was already removed.

This code fixes it by still invoking the handler from readyRead() but
passing a SocketListener that won't attempt to send messages.

5 years agoWizard: Avoid cert dialog multiple connection
Christian Kamm [Mon, 18 Feb 2019 13:02:14 +0000 (14:02 +0100)]
Wizard: Avoid cert dialog multiple connection

This could lead to odd behavior when slotCertificateAccepted
was called multiple times.

5 years agoFolder wizard: Fix infinite loop for bad paths #7041
Christian Kamm [Mon, 18 Feb 2019 13:32:47 +0000 (14:32 +0100)]
Folder wizard: Fix infinite loop for bad paths #7041

5 years agoDiscovery win: Fix detection of case-only renames
Christian Kamm [Thu, 14 Feb 2019 13:52:22 +0000 (14:52 +0100)]
Discovery win: Fix detection of case-only renames

Previously they were detected as DELETE+NEW because if "a" is renamed to
"A" then QFile::exists("a") will still return true on Windows.

5 years agoEnsure local discovery on selective sync changes
Christian Kamm [Wed, 13 Feb 2019 13:18:54 +0000 (14:18 +0100)]
Ensure local discovery on selective sync changes

As far as I'm aware local discovery can be skipped on folders that are
selective-sync blacklisted, so a local discovery is required when an
entry is removed from the blacklist.

Also rename
avoidReadFromDbOnNextSync() -> schedulePathForRemoteDiscovery()
since the old name might also imply it's not read from db in the local
discovery - which is not the case. Use Folder::
schedulePathForLocalDiscovery() for that.

5 years agoFix warnings about signedness
Christian Kamm [Wed, 13 Feb 2019 09:15:33 +0000 (10:15 +0100)]
Fix warnings about signedness

Sizes are always qint64, not unsigned.
TransferIds are always uint.

5 years agoTests: Fix permission propagation check
Christian Kamm [Wed, 13 Feb 2019 10:17:51 +0000 (11:17 +0100)]
Tests: Fix permission propagation check

It was using the wrong path to the conflict file.

5 years agoTest: Add check for permission propagation
Christian Kamm [Mon, 11 Feb 2019 12:25:56 +0000 (13:25 +0100)]
Test: Add check for permission propagation

Also covering propagation to the downloaded file when a conflict-rename
is done at the same time, which used to not work.

5 years agoTests: Add db checks to rename/move tests
Christian Kamm [Sat, 9 Feb 2019 16:04:42 +0000 (17:04 +0100)]
Tests: Add db checks to rename/move tests

For moves it's relevant that the old db entry is removed and the new one
is created at the right location.

5 years agoVfs: Improve sync protocol entries for actions
Christian Kamm [Fri, 8 Feb 2019 11:21:25 +0000 (12:21 +0100)]
Vfs: Improve sync protocol entries for actions

Creating a new virtual file and replacing a file with a virtual one now
have their own text in the protocol, not just "Downloaded".

To do this, the SyncFileItem type is kept as
ItemTypeVirtualFileDehydration for these actions. Added new code to
ensure the type isn't written to the database.

While looking at this, I've also added documentation on SyncFileItem's
_file, _renameTarget, _originalFile and destination() because some of
the semantics weren't clear.

5 years agoVfs: Make dehydration a SYNC and not a NEW action
Christian Kamm [Fri, 8 Feb 2019 11:18:22 +0000 (12:18 +0100)]
Vfs: Make dehydration a SYNC and not a NEW action

That change will be useful for the notifications. Previously the
dehydrated files were reported as "newly downloaded", now they're
reported as "updated".

5 years agoPropagateDownload: Create conflict even if local file changed
Christian Kamm [Wed, 6 Feb 2019 14:12:57 +0000 (15:12 +0100)]
PropagateDownload: Create conflict even if local file changed

Fixes a bug introduced while moving the attribute propagation before the
conflict-renaming.

5 years agoVfs suffix: Fix dehydration creating the wrong db entry
Christian Kamm [Wed, 6 Feb 2019 14:07:54 +0000 (15:07 +0100)]
Vfs suffix: Fix dehydration creating the wrong db entry

5 years agoVfs: Ensure VfsOff works without start() being called
Christian Kamm [Wed, 6 Feb 2019 13:44:05 +0000 (14:44 +0100)]
Vfs: Ensure VfsOff works without start() being called

In tests an un-started Vfs instance is sometimes passed to SyncEngine
via SyncOptions.

5 years agoVfs: Remove VfsDefaults
Christian Kamm [Wed, 6 Feb 2019 09:41:33 +0000 (10:41 +0100)]
Vfs: Remove VfsDefaults

That just complicated things. It's ok if Vfs is not a fully abstract
interface class.

The pinstate-in-db methods are instead provided directly on Vfs and
VfsSuffix and VfsOff use them to implement pin states.

The start() method is simply non-virtual and calls into startImpl() for
the plugin-specific startup code.

5 years agoVfs: Add option to hide socketapi pin actions
Christian Kamm [Wed, 6 Feb 2019 09:17:35 +0000 (10:17 +0100)]
Vfs: Add option to hide socketapi pin actions

Because some plugins provide alternative ui.

5 years agoPropagateDownload: Conflict-rename later
Christian Kamm [Tue, 5 Feb 2019 10:42:15 +0000 (11:42 +0100)]
PropagateDownload: Conflict-rename later

The block of code that propagated attributes etc from the previously
existing file was placed *after* the block that renamed the previously
existing file to a conflict name. That meant the propagation didn't work
in the conflict case.

5 years agoVfs: dehydration is separate action
Christian Kamm [Fri, 1 Feb 2019 10:23:00 +0000 (11:23 +0100)]
Vfs: dehydration is separate action

Allows for better attribute preservation.

Also add verifyFileUnchanged() call before dehydration to avoid data
loss when discovery takes a while.

5 years agoFile watcher: Pin state attribute changes are valid notifications
Christian Kamm [Tue, 29 Jan 2019 10:41:03 +0000 (11:41 +0100)]
File watcher: Pin state attribute changes are valid notifications

Previously they would be discarded since the file's mtime or size hadn't
changed.

5 years agoPinStates cleanup
Christian Kamm [Tue, 29 Jan 2019 09:53:47 +0000 (10:53 +0100)]
PinStates cleanup

- SyncJournalDB functions now behind internalPinStates() to avoid
accidental usage, when nearly everyone should go through Vfs.
- Rename Vfs::getPinState() to Vfs::pinState()

5 years agoFolder: Add remoteFolderTrailingSlash()
Christian Kamm [Fri, 25 Jan 2019 06:46:16 +0000 (07:46 +0100)]
Folder: Add remoteFolderTrailingSlash()

There were cases where the "/" exception wasn't handled correctly
and there'd be extra slashes in generated paths.

5 years agoVfs: Call unregisterFolder() when folder is removed
Christian Kamm [Fri, 25 Jan 2019 12:16:32 +0000 (13:16 +0100)]
Vfs: Call unregisterFolder() when folder is removed

5 years agoVfs: Enable propagating attributes on download
Christian Kamm [Fri, 25 Jan 2019 10:11:28 +0000 (11:11 +0100)]
Vfs: Enable propagating attributes on download

5 years agoSyncFileStatusTracker: Distinguish Warning and Excluded
Christian Kamm [Fri, 25 Jan 2019 10:09:50 +0000 (11:09 +0100)]
SyncFileStatusTracker: Distinguish Warning and Excluded

Any folder with a (potentially deeply) contained error will have
StatusWarning. StatusExcluded marks exclusions. The difference is useful
to know for VFS.

5 years agoPin state updates
Christian Kamm [Wed, 23 Jan 2019 14:12:02 +0000 (15:12 +0100)]
Pin state updates

- unspecified and inherited are different
- move enum to header in common/
- access through Vfs instead of directly in Journal

5 years agoVfs: Shell integration is enabled optionally
Christian Kamm [Wed, 23 Jan 2019 12:07:56 +0000 (13:07 +0100)]
Vfs: Shell integration is enabled optionally

Needs to be disabled for tests in some cases.

5 years agoVfs: Clarify SyncEngine::wipeVirtualFiles()
Christian Kamm [Wed, 23 Jan 2019 11:58:14 +0000 (12:58 +0100)]
Vfs: Clarify SyncEngine::wipeVirtualFiles()

Possibly the behavior should actually change and the function should
de-placeholder all items, not just dehydrated ones.

5 years agoDiscovery: Files can have dehydrate/download actions
Christian Kamm [Tue, 22 Jan 2019 12:32:28 +0000 (13:32 +0100)]
Discovery: Files can have dehydrate/download actions

This will be used in conjunction with vfs plugins that detect whether a
file has a pending hydration/dehydration through independent means and
communicate that to the discovery through local file type.

5 years agoDiscovery: Add signal for silentlyExcluded files
Christian Kamm [Tue, 22 Jan 2019 10:29:03 +0000 (11:29 +0100)]
Discovery: Add signal for silentlyExcluded files

This allows SyncFileStatusTracker to also know about these. After all
its information is used to provide icons for them too.

5 years agoVfs: Send SyncFileStatusTracker data to vfs plugins
Christian Kamm [Mon, 21 Jan 2019 10:24:16 +0000 (11:24 +0100)]
Vfs: Send SyncFileStatusTracker data to vfs plugins

5 years agoVfs: Make files that end up in db placeholders
Christian Kamm [Mon, 21 Jan 2019 10:22:40 +0000 (11:22 +0100)]
Vfs: Make files that end up in db placeholders

Since 'placeholder' just means that it's an item of the special type
that the vfs plugin can deal with - no matter whether hydrated or
dehydrated - all done items should become placeholders. Even
directories.

Now every file that passes through updateMetadata() will be converted to
a placeholder if necessary.

5 years agoPropagator: Helper for updating db
Christian Kamm [Mon, 21 Jan 2019 10:19:45 +0000 (11:19 +0100)]
Propagator: Helper for updating db

Similar steps were done in many propagation jobs.

This also updates the db entry to always have the item.destination() as
file path.

5 years agoMove SyncFileStatus to libcommon
Christian Kamm [Mon, 21 Jan 2019 10:13:17 +0000 (11:13 +0100)]
Move SyncFileStatus to libcommon

It'll be needed in vfs plugins so they can connect to the data coming
out of SyncFileStatusTracker.

5 years agoBuild fix for mingw64 7.3 (Qt 5.12.0)
Christian Kamm [Tue, 15 Jan 2019 13:54:30 +0000 (14:54 +0100)]
Build fix for mingw64 7.3 (Qt 5.12.0)

5 years agoFile watcher: Reduce touch ignore duration
Christian Kamm [Fri, 8 Feb 2019 08:57:11 +0000 (09:57 +0100)]
File watcher: Reduce touch ignore duration

On Linux and Windows the file watcher can't distinguish between changes
that were caused by the process itself, like during a sync operation,
and external changes. To work around that the client keeps a list of
files it has touched and blocks notifications on these files for a bit.

The duration of this block was originally and arbitrarily set at 15
seconds. During manual tests I regularly thought there was a bug when
syncs didn't trigger, when the only problem was that my changes happened
too close to a previous sync operation.

This change reduces the duration to three seconds. I imagine that this
is still enough.

Also use std::chrono while at it.

5 years agoSwitch to standard opt-out BUILD_TESTING instead of opt-in UNIT_TESTING
Dominik Schmidt [Thu, 6 Dec 2018 11:03:59 +0000 (12:03 +0100)]
Switch to standard opt-out BUILD_TESTING instead of opt-in UNIT_TESTING

Compare https://cmake.org/cmake/help/v3.0/module/CTest.html
Craft automatically handles BUILD_TESTING, so we don't need to handle it
in our own blueprint.

5 years agoHttpCreds: Warn in log if keychain-write jobs fail #6776
Christian Kamm [Tue, 22 Jan 2019 09:04:08 +0000 (10:04 +0100)]
HttpCreds: Warn in log if keychain-write jobs fail #6776

Also, calling deleteLater() on jobs is unnecessary (they autodelete
after finished()) and deleting the attached QSettings is also
unnecessary because the settings object is parented to the job.

5 years agoDownload: Ignore content-length for compressed HTTP2/SPDY replies #6885
Christian Kamm [Wed, 30 Jan 2019 04:43:08 +0000 (05:43 +0100)]
Download: Ignore content-length for compressed HTTP2/SPDY replies #6885

It contains the compressed size.

See https://bugreports.qt.io/browse/QTBUG-73364

5 years agoSocketAPI: Remove listener immediately on lost connection
Christian Kamm [Thu, 17 Jan 2019 09:21:22 +0000 (10:21 +0100)]
SocketAPI: Remove listener immediately on lost connection

To avoid situations where messages are attempted to be sent to dead
connections.

5 years agoSocketAPI OSX: Forbid further sends on connectionDidDie
Christian Kamm [Thu, 17 Jan 2019 09:16:44 +0000 (10:16 +0100)]
SocketAPI OSX: Forbid further sends on connectionDidDie

Also release the remote end immediately.

5 years agoMove: Fix move detection in directory move on the other side
Olivier Goffart [Fri, 18 Jan 2019 11:27:46 +0000 (12:27 +0100)]
Move: Fix move detection in directory move on the other side

5 years agoMove: add comments and tests
Olivier Goffart [Fri, 18 Jan 2019 10:59:12 +0000 (11:59 +0100)]
Move: add comments and tests

5 years agoMove: add more test and fix move within moves
Olivier Goffart [Sun, 23 Dec 2018 10:30:02 +0000 (11:30 +0100)]
Move: add more test and fix move within moves

5 years agoRename: fix renamed folder moved into renamed folder issue
Olivier Goffart [Sun, 23 Dec 2018 09:19:20 +0000 (10:19 +0100)]
Rename: fix renamed folder moved into renamed folder issue

Issue #6694

5 years agovfs: Update pinning context menu to be less confusing
Christian Kamm [Tue, 15 Jan 2019 09:52:44 +0000 (10:52 +0100)]
vfs: Update pinning context menu to be less confusing

Seeing "Currently available online only" for a currently hydrated file
was odd. It makes sense since current hydration status and pin state are
independent.

The new text will say something like "Currently available, but marked
online only" to better indicate that the file might be dehydrated later
since it wasn't pinned.

5 years agoVfs: Switch on/off only when sync isn't running #6936
Christian Kamm [Mon, 14 Jan 2019 14:48:08 +0000 (15:48 +0100)]
Vfs: Switch on/off only when sync isn't running #6936

Avoids some situations that might cause data loss.

5 years agoFolder: Add selective sync / ui related flags
Christian Kamm [Mon, 14 Jan 2019 14:46:40 +0000 (15:46 +0100)]
Folder: Add selective sync / ui related flags

supportsSelectiveSync(): clearer than !supportsVirtualFiles() and allows
  extra logic

isVfsOnOffSwitchPending(): Somewhat awkward way of dealing with the
  phase between a user requesting vfs state to be switched and it
  actually happening

5 years agoSyncEngine: Rename phase finishing slots
Christian Kamm [Mon, 14 Jan 2019 14:44:50 +0000 (15:44 +0100)]
SyncEngine: Rename phase finishing slots

slotDiscoveryJobFinished -> slotDiscoveryFinished
slotFinished -> slotPropagationFinished

This should be clearer. Particular the
slotFinished -> finalize -> emit finished()
chain was confusing before.

5 years agoDiscovery: Fix aborting during discovery #6972
Christian Kamm [Mon, 14 Jan 2019 14:41:34 +0000 (15:41 +0100)]
Discovery: Fix aborting during discovery #6972

5 years agovfs suffix: Ignore server files or synced files with the suffix #6953
Christian Kamm [Thu, 10 Jan 2019 12:26:26 +0000 (13:26 +0100)]
vfs suffix: Ignore server files or synced files with the suffix #6953

5 years agoDiscovery: Ensure selective sync lists are sorted #6958
Christian Kamm [Thu, 10 Jan 2019 09:19:27 +0000 (10:19 +0100)]
Discovery: Ensure selective sync lists are sorted #6958

5 years agovfs: Add vfs migration options to folder context menu
Christian Kamm [Thu, 26 Nov 2020 23:57:49 +0000 (00:57 +0100)]
vfs: Add vfs migration options to folder context menu

This allows enabling and disabling vfs.

To distinguish this operation from setting the root pin state, the
availability setting is adjusted as well to be similar to the
menu that shows in the shell extensions.

5 years agovfs: Allow retrieving of pin state paths and flags
Christian Kamm [Tue, 8 Jan 2019 14:15:17 +0000 (15:15 +0100)]
vfs: Allow retrieving of pin state paths and flags

5 years agoResult: Add copy/move ctor/op=
Christian Kamm [Tue, 8 Jan 2019 13:55:30 +0000 (14:55 +0100)]
Result: Add copy/move ctor/op=

It has a destructor and these operations make sense. Particularly the
move is important for code like:

Result<x, y> foo() { Result<x, y> v; return v; }

because the move-ctor will not autogenerate if x or y are not trivially
destructible.

5 years agovfs: Change per-folder message on vfs support
Christian Kamm [Tue, 8 Jan 2019 12:10:20 +0000 (13:10 +0100)]
vfs: Change per-folder message on vfs support

I'm unsure this note is all that useful. Remove entirely?

5 years agovfs: Allow (de-)hydrating the full sync folder
Christian Kamm [Tue, 8 Jan 2019 11:24:15 +0000 (12:24 +0100)]
vfs: Allow (de-)hydrating the full sync folder

5 years agovfs: Don't assume suffix mode for old folders
Christian Kamm [Tue, 8 Jan 2019 08:28:40 +0000 (09:28 +0100)]
vfs: Don't assume suffix mode for old folders

That would break with old folders that use selective sync.

5 years agovfs: Disable selective sync if vfs support is available
Christian Kamm [Tue, 8 Jan 2019 08:14:38 +0000 (09:14 +0100)]
vfs: Disable selective sync if vfs support is available

5 years agoWizard: Ensure client cert doesn't get lost #6911
Christian Kamm [Fri, 11 Jan 2019 12:14:30 +0000 (13:14 +0100)]
Wizard: Ensure client cert doesn't get lost #6911

5 years agoWizard: Drop unused function
Christian Kamm [Fri, 11 Jan 2019 11:54:33 +0000 (12:54 +0100)]
Wizard: Drop unused function

5 years agoSync: Display theme in debug log
Markus Goetz [Fri, 11 Jan 2019 10:26:22 +0000 (11:26 +0100)]
Sync: Display theme in debug log

5 years agosqlite: Set exclusive locking_mode to avoid WAL issues #6881
Christian Kamm [Thu, 10 Jan 2019 08:21:48 +0000 (09:21 +0100)]
sqlite: Set exclusive locking_mode to avoid WAL issues #6881

Can be overridden with OWNCLOUD_SQLITE_LOCKING_MODE

5 years agoFix lookup of system wide settings
Dominik Schmidt [Wed, 9 Jan 2019 15:00:33 +0000 (16:00 +0100)]
Fix lookup of system wide settings

5 years agosqlite: Update bundled version to 3.26.0
Olivier Goffart [Tue, 18 Dec 2018 11:18:43 +0000 (12:18 +0100)]
sqlite: Update bundled version to 3.26.0

For OS X and Windows.

5 years agoHttpCredentials: Do not re-enter the event loop
Olivier Goffart [Thu, 29 Nov 2018 11:40:00 +0000 (12:40 +0100)]
HttpCredentials: Do not re-enter the event loop

https://sentry.io/owncloud/desktop-win-and-mac/issues/777907931/
mention a crash in OCC::HttpCredentialsGui::showDialog
One possible explaination is that this is caused by re-entring the event loop.
So don't do that.

5 years agoChunking Move: Fix too many starting slashes in the destination header
Olivier Goffart [Thu, 29 Nov 2018 22:17:34 +0000 (23:17 +0100)]
Chunking Move: Fix too many starting slashes in the destination header

Commit 6ca724f fixed it for the move case. But the upload MOVE did the same

Issue #6904