Commit Graph

25 Commits

Author SHA1 Message Date
Christian Kamm
f786ef1430 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.
2019-02-11 13:35:14 +01:00
Christian Kamm
9b7eba0174 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".
2019-02-11 13:35:14 +01:00
Christian Kamm
30d7157eb8 Vfs suffix: Fix dehydration creating the wrong db entry 2019-02-11 13:35:14 +01:00
Christian Kamm
210f309e6e PinStates cleanup
- SyncJournalDB functions now behind internalPinStates() to avoid
accidental usage, when nearly everyone should go through Vfs.
- Rename Vfs::getPinState() to Vfs::pinState()
2019-02-11 13:35:14 +01:00
Christian Kamm
010abe4c82 Pin state updates
- unspecified and inherited are different
- move enum to header in common/
- access through Vfs instead of directly in Journal
2019-02-11 13:35:14 +01:00
Christian Kamm
90a8eaa949 vfs suffix: Ignore server files or synced files with the suffix #6953 2019-01-18 11:03:01 +01:00
Christian Kamm
df1723c9b2 vfs: Remove newFilesAreVirtual - use root PinState instead
This unifies how to deal with pin states.

Also enable reading a folders direct pin state vs its effective pin
state.
2019-01-07 10:09:03 +01:00
Christian Kamm
fac6ad354f vfs: Use PinState in sync algorithm #6815
New files are virtual if the file's pin state is OnlineOnly.
2018-12-19 14:04:24 +01:00
Christian Kamm
18ab3f5dcd vfs: Separate vfs availability from new-files-virtual
This helps support 2.5 settings where there are virtual files in the
tree but new files aren't created virtual.

It's also a prelude for #6815

There's currently no way of
- upgrading vfs plugins (a silent suffix->winvfs upgrade is attempted
  once only, when moving to master)
- disabling vfs capabilities outright
2018-11-26 13:02:48 +01:00
Christian Kamm
4f56366fd5 vfs: Ensure SyncOptions::_vfs is never null
- Create a VfsOff derived class
- Make it a shared pointer shared with Folder::_vfs
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
59a114cd4d vfs: Fix plugin decision in wizards, sanitize loading 2018-11-26 13:02:48 +01:00
Christian Kamm
06928a4037 winvfs: initial work
Done by ckamm and dschmidt
2018-11-26 12:53:30 +01:00
Christian Kamm
07ce6a8399 Discovery: Add back virtual file instruction checks 2018-10-19 10:24:47 +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
Christian Kamm
5e442f588e Virtual files: Renames propagate #6718 2018-09-26 16:39:41 +02:00
Olivier Goffart
597c28f316 Merge remote-tracking branch 'master' into new_discovery_algo 2018-08-21 11:22:38 +02:00
Olivier Goffart
d1e15b7802 Virtual Files: Set the mtime of the virtual file to that of the server
Note: When the server mtime is modified, the mtime of the file is not updated

Issue #6727
2018-08-19 21:11:59 +02:00
Christian Kamm
0b9049e6ff Virtual files: Renaming to virtual doesn't delete data #6718
Unfortunately to do this, the local update phase must write to the
database, creating a new side-effect and order dependency (local update
must run before remote update).
2018-08-17 14:27:09 +02:00
Olivier Goffart
33940c0fd1 Skip failing test
These tests are failling because now we consider that any files that ends
with .owncloud is a virtual file, regardless what the DB say.
2018-07-26 13:55:13 +02:00
Olivier Goffart
a299907c59 New discovery algorithm: Virtual files
The commented tests lines were implementation details
2018-07-17 13:35:07 +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
3a7a6b0b9e Virtual files: Wipe virtual after download completes, not before
Otherwise a interrupted or unsuccessful download would mean that the
download-intend was forgotten. The next sync would reestablish the
virtual file instead.
2018-05-30 11:50:14 +02:00
Christian Kamm
252484e875 Virtual files: Only remove virtual file once on download
With thanks to @ogoffart for spotting the problem.
2018-05-30 10:39:49 +02:00
Christian Kamm
8f9f2b5462 Rename Placeholders to Virtual Files in code #6531 2018-05-23 09:57:00 +02:00