VfsSuffix: Wipe stale pin states #7273
authorChristian Kamm <mail@ckamm.de>
Thu, 27 Jun 2019 13:47:04 +0000 (15:47 +0200)
committerKevin Ottens <kevin.ottens@nextcloud.com>
Tue, 15 Dec 2020 09:58:52 +0000 (10:58 +0100)
commit5acb157a7ee82dd5122b606e58af78cf360e9d43
tree98d541ea10b5e72c7ec0d474994a8352b9a11795
parent0e9f030b0f9fe4f8c82595e7dd3a0fbb7742ad42
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.
src/common/syncjournaldb.cpp
src/common/syncjournaldb.h
src/common/vfs.cpp
src/common/vfs.h
src/gui/folder.cpp
src/gui/socketapi.cpp
src/libsync/discovery.cpp
src/libsync/propagatedownload.cpp
src/libsync/syncengine.cpp
src/libsync/vfs/suffix/vfs_suffix.cpp
test/testsyncvirtualfiles.cpp