Commit Graph

263 Commits

Author SHA1 Message Date
Christian Kamm
1f4565923e Folder settings: Keep "usePlaceholders" to be backwards compatible 2018-11-26 13:02:48 +01:00
Christian Kamm
6d0f9a50ad vfs: Be more careful about Vfs instance ownership 2018-11-26 13:02:48 +01:00
Christian Kamm
c84ad025b3 vfs: Improve modeFromString() signature 2018-11-26 13:02:48 +01:00
Christian Kamm
a99289442e vfs: Fix dealing with missing vfs instance
Maybe there should just be a VfsOff instance to make this less error
prone.
2018-11-26 13:02:48 +01:00
Christian Kamm
202a2ba7ad vfs: Make switching vfs on/off work again 2018-11-26 13:02:48 +01:00
Christian Kamm
59a114cd4d vfs: Fix plugin decision in wizards, sanitize loading 2018-11-26 13:02:48 +01:00
Christian Kamm
0281aaf544 vfs: Allow folders without vfs 2018-11-26 12:59:51 +01:00
Christian Kamm
06928a4037 winvfs: initial work
Done by ckamm and dschmidt
2018-11-26 12:53:30 +01:00
Christian Kamm
96df14f897 FolderMan: Remove assumption of unique running sync 2018-11-26 12:47:31 +01:00
Olivier Goffart
9f43d8e0ab Revert "Database: future-proof to allow downgrade from future version"
This commit does not need to be in 2.6, it is only supposed to be in 2.5.1

This reverts commit a97f6fcfb2.
2018-10-31 16:30:06 +01:00
Olivier Goffart
a699903122 Merge remote-tracking branch 'origin/master' into new_discovery_algo
Conflicts:
	src/libsync/discoveryphase.cpp
2018-10-31 16:29:29 +01:00
Olivier Goffart
8aee6426af Merge remote-tracking branch 'origin/2.5' 2018-10-31 16:26:45 +01:00
Olivier Goffart
a97f6fcfb2 Database: future-proof to allow downgrade from future version
The 2.6 client will introduce an index that depends on a custom
function.
This causes insersion onto the metadata database to fail if the database
it opened with older version of the client. (Which will cause the client
to abort)

Delete this index in this version in order to allow downgrade.

In addition, allow to load folder with version '2', but still write
version '1' in the config file

Of course this commit need not to be in the 2.6 release
2018-10-31 11:30:35 +01:00
Christian Kamm
7519c64e86 Settings: Make FoldersWithPlaceholders group sticky
If virtual files are disabled on a folder it might still have db entries
or local virtual files that would confuse older client versions.
2018-10-29 19:54:21 +01:00
Olivier Goffart
2e16f654ea Merge remote-tracking branch 'owncloud/master' into new_discovery_algo
Conflicts:
	src/csync/csync_update.cpp
        test/csync/csync_tests/check_csync_update.cpp
2018-10-18 13:22:29 +02:00
Olivier Goffart
7daf393c1c Merge remote-tracking branch 'origin/2.5'
Conflicts:
	ChangeLog
2018-10-18 13:05:34 +02:00
Olivier Goffart
6ca5facbaf Account Settings: Add a context menu entry to enable or disable virtual files
Issue #6725
2018-10-17 09:05:32 +02:00
Olivier Goffart
20e6ac05e4 Remove the backup deteciton code which was used for server < 9.1 2018-10-16 16:08:49 +02:00
Olivier Goffart
84c871c087 New discovery algorithm: Parallel PROPFIND 2018-10-12 14:46:46 +02:00
Olivier Goffart
28f1c95b96 Merge remote-tracking branch 'origin/master' into new_discovery_algo
Conflicts:
	src/csync/csync_reconcile.cpp
	src/csync/csync_update.cpp
	src/libsync/syncengine.cpp
	src/libsync/syncengine.h

Note: csync changes from 5e442f588e
are not included and will be fixed separately
2018-10-04 11:23:19 +02:00
Olivier Goffart
0290564d5c Merge remote-tracking branch 'owncloud/master' into delta-sync
Conflicts:
	.gitmodules
	src/cmd/cmd.cpp
	src/gui/generalsettings.ui
	src/libsync/propagatedownload.cpp
	src/libsync/propagateuploadng.cpp
2018-09-14 15:25:59 +02:00
Olivier Goffart
eb669c997e More cleanup of csync remains 2018-07-26 13:55:02 +02:00
Olivier Goffart
1753ce651b Virtual Files: Allow to download a folder recursively from the socket API
Issue: #6466
2018-05-30 11:57:57 +02:00
Christian Kamm
57a2881906 Config: Add version flags to accounts and folders
Also, if there is too-new configuration, backup the file, show a
warning message asking the user whether it's ok to discard the
configuration from the future.

See #6504
2018-05-24 12:18:44 +02:00
Christian Kamm
8f9f2b5462 Rename Placeholders to Virtual Files in code #6531 2018-05-23 09:57:00 +02:00
Christian Kamm
c80ee0ea48 Placeholders: Save to key that's invisible to <2.5 clients #6504 2018-05-15 14:26:35 +02:00
Christian Kamm
9555f8d75c Show a tray message when a folder watcher becomes unreliable #6119 2018-04-24 13:06:50 +02:00
Christian Kamm
7c558394c1 LocalDiscoveryTracker: Separate from Folder and move to libsync
To allow relevant code to be closer together and for testing in
unittests without having to get a gui Folder.

See #6120
2018-04-19 10:58:46 +02:00
Christian Kamm
9e8464e114 Merge branch 'placeholder-prototype' 2018-04-18 11:02:53 +02:00
Christian Kamm
70b4dc99dc NSIS: Register placeholder extension
Also change the placeholder suffix config option to not include the dot,
the dotless form is needed in the nsis script.
2018-04-18 10:27:51 +02:00
Olivier Goffart
87433bfe87 Placeholder: The extension is now a branding option 2018-04-18 10:27:51 +02:00
Christian Kamm
01bb241e48 Placeholders: Safe migration to older client versions
Now the db entries for placeholders will have the full placeholder
paths. That way older clients will, on remote discovery, delete the
placeholders and download the real files.
2018-04-18 10:27:51 +02:00
Olivier Goffart
a2191474eb Placeholders: Move the placeholder option from the account to the folder 2018-04-18 10:27:51 +02:00
Olivier Goffart
cc8497916d PlaceHolders: Trigger a download of the placeholder and open it 2018-04-18 10:27:51 +02:00
Christian Kamm
02a2056543 Notify if an explicitly excluded folder is created #6222 2018-04-03 14:03:46 +02:00
Olivier Goffart
26b991c0c0 Folder: normalize the local path.
We otherwise normalize all path in the C form, so we must have
the Folder's path normalized the same. Or all comparizon will fail
(such as knowing if a file from the SocketAPI or the FilesystemWatcher
are part of the folder)

Issue #4424
2018-03-27 10:54:10 +02:00
Christian Kamm
797473ba1f SyncResult: Make sure the number of conflicts is correct #6226
If the SyncResult incorrectly believes that there are no conflicts, the
tray icon won't be correct and there will be no warning about unresolved
conflicts on the account.

Nevertheless, it's pretty awkward that the IssuesWidget is better
informed about pending conflicts than the Folder itself. This kind of
backwards data flow is very confusing.

Unfortunately the only alternative I see is to either keep track of
this information in two places (also in Folder), or create a common
data-holding class that can serve as a model instance for the issues
view as well as provide data directly to the Folder - which would
have been a much larger change.
2018-03-06 13:02:54 +01:00
Christian Kamm
48dd8ed6c2 Partial local discovery: Fix scheduling logic
A recent patch that touched the condition for deciding whether a
periodic full local discovery is necessary accidentally inverted the
condition.
2018-02-20 18:07:28 +01:00
Christian Kamm
110ce283d8 Merge remote-tracking branch 'ahmedammar/master' into delta-sync 2018-01-30 11:16:45 +01:00
Oleg Solovyov
c5d37dfedc Move remote-deleted files to trash
Squashed from https://github.com/owncloud/client/pull/6265

Linux only, Hidden option, disabled by default
2018-01-25 14:40:16 +01:00
Olivier Goffart
eae00f9969 Use std::chrono::milliseconds to represent milliseconds 2018-01-25 14:07:08 +01:00
Ahmed Ammar
12aeb890c9 Implementation of delta-sync support on client-side.
This commit adds client-side support for delta-sync, this adds a new
3rdparty submodule `gh:ahmedammar/zsync`. This zsync tree is a modified
version of upstream, adding some needed support for the upload path and
other requirements.

If the server does not announce the required zsync capability then a
full upload/download is fallen back to. Delta synchronization can be
enabled/disabled using command line, config, or gui options.

On both upload and download paths, a check is made for the existance of
a zsync metadata file on the server for a given path. This is provided
by a dav property called `zsync`, found during discovery phase. If it
doesn't exist the code reverts back to a complete upload or download,
i.e. previous implementations. In the case of upload, a new zsync
metadata file will be uploaded as part of the chunked upload and future
synchronizations will be delta-sync capable.

Chunked uploads no longer use sequential file names for each chunk id,
instead, they are named as the byte offset into the remote file, this is
a minimally intrusive modification to allow fo delta-sync and legacy
code paths to run seamlessly. A new http header OC-Total-File-Length is
sent, which informs the server of the final expected size of the file
not just the total transmitted bytes as reported by OC-Total-Length.

The seeding and generation of the zsync metadata file is done in a
separate thread since this is a cpu intensive task, ensuring main thread
is not blocked.

This commit closes owncloud/client#179.
2018-01-15 10:34:57 -05:00
Olivier Goffart
2a14ba5582 Folder: remove declaration of non-existing method 2018-01-15 15:43:13 +01:00
Christian Kamm
86377aa37a Folder: Remove unused 'dirty proxy' setting 2018-01-05 09:44:20 +01:00
Christian Kamm
7ab127ad53 Excludes: Refactor for pending improvements
Make ExcludedFiles something that is instantiated outside of
the CSYNC context and then given to it as a hook.

ExcludedFiles still lives in csync_exclude and the internal
workings haven't been touched.
2017-12-07 14:38:21 +01:00
Christian Kamm
05c1bfb6cf Merge remote-tracking branch 'origin/2.4' 2017-10-27 10:29:31 +02:00
Jocelyn Turcotte
56e38e6f80 Windows: Add sync folders to Explorer's navigation pane
This is only the navigation pane, the SyncRootManager entries aren't handled yet.

This follows the instructions from:
https://msdn.microsoft.com/en-us/library/windows/desktop/dn889934%28v=vs.85%29.aspx

Issue #5295
2017-10-24 16:10:53 +02:00
Olivier Goffart
ee63b36ed3 SyncFileStatusTracker: Detect changed in the shared flag
... even if the file is not changed.

We get an UPDATE_METADATA in that case, so make sure we let the
SyncFileStatusTracker know about it.
That means we need to filter out UPDATE_METADATA in the other listeners
of this signal.

Issue #6098
2017-10-24 15:50:14 +02:00
Christian Kamm
e85a339d94 Local discovery: Use db instead of filesystem
We mostly trust the file watchers meaning that we don't re-scan the
local tree if we have done that recently and no file watcher events
have arrived. If the file watchers invalidate a subtree, we rescan
only that subtree.

Since we're not entirely sure the file watchers are reliable, we still
do full local discoveries regularly (1h by default). There is a config
file setting as well as an environment variable to control the interval.
2017-10-24 10:00:20 +02:00
Christian Kamm
fb2d31c9ce Folder: Move FolderWatcher to Folder
This makes it unnecessary for FolderMan to manage the list and removes
the need for some forwarders.

This is done in preparation for follow-up commits that want to add
diagnostics to FolderWatcher that shall be available from within Folder.
2017-10-24 10:00:20 +02:00