projects
/
nextcloud-desktop.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3f55f93
)
Vfs suffix: Require suffix when creating placeholder files
author
Christian Kamm
<mail@ckamm.de>
Fri, 29 Mar 2019 08:36:45 +0000
(09:36 +0100)
committer
Kevin Ottens
<kevin.ottens@nextcloud.com>
Tue, 15 Dec 2020 09:58:45 +0000
(10:58 +0100)
src/libsync/vfs/suffix/vfs_suffix.cpp
patch
|
blob
|
history
diff --git
a/src/libsync/vfs/suffix/vfs_suffix.cpp
b/src/libsync/vfs/suffix/vfs_suffix.cpp
index aac43ea81ebeececbe9ca67a1159f57740044809..9860c24b2d1c9c859c13f5733ceacce6dbdf25a3 100644
(file)
--- a/
src/libsync/vfs/suffix/vfs_suffix.cpp
+++ b/
src/libsync/vfs/suffix/vfs_suffix.cpp
@@
-63,6
+63,11
@@
void VfsSuffix::createPlaceholder(const SyncFileItem &item)
{
// The concrete shape of the placeholder is also used in isDehydratedPlaceholder() below
QString fn = _setupParams.filesystemPath + item._file;
+ if (!fn.endsWith(fileSuffix())) {
+ ASSERT(false, "vfs file isn't ending with suffix");
+ return;
+ }
+
QFile file(fn);
file.open(QFile::ReadWrite | QFile::Truncate);
file.write(" ");